{
    "mode": "man",
    "parameter": "ip-link",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/ip-link/8/json",
    "generated": "2026-10-20T08:00:44Z",
    "synopsis": "ip link  { COMMAND | help }\nip link add [ link DEVICE ] [ name ] NAME\n[ txqueuelen PACKETS ]\n[ address LLADDR ] [ broadcast LLADDR ]\n[ mtu MTU ] [ index IDX ]\n[ numtxqueues QUEUECOUNT ] [ numrxqueues QUEUECOUNT ]\n[ gsomaxsize BYTES ] [ gsomaxsegs SEGMENTS ]\n[ gromaxsize BYTES ] [ netns { PID | NETNSNAME } ]\ntype TYPE [ ARGS ]\nip link delete { DEVICE | group GROUP } type TYPE [ ARGS ]\nip link set { DEVICE | group GROUP }\n[ { up | down } ]\n[ type ETYPE TYPEARGS ]\n[ arp { on | off } ]\n[ dynamic { on | off } ]\n[ multicast { on | off } ]\n[ allmulticast { on | off } ]\n[ promisc { on | off } ]\n[ protodown { on | off } ]\n[ protodownreason PREASON { on | off } ]\n[ trailers { on | off } ]\n[ txqueuelen PACKETS ]\n[ maxgsosize BYTES ] [ maxgsosegs SEGMENTS ] [ maxgrosize BYTES ]\n[ name NEWNAME ]\n[ address LLADDR ]\n[ broadcast LLADDR ]\n[ mtu MTU ]\n[ netns { PID | NETNSNAME } ]\n[ link-netnsid ID ]\n[ alias NAME ]\n[ vf NUM [ mac LLADDR ]\n[ VFVLAN-LIST ]\n[ rate TXRATE ]\n[ maxtxrate TXRATE ]\n[ mintxrate TXRATE ]\n[ spoofchk { on | off } ]\n[ queryrss { on | off } ]\n[ state { auto | enable | disable } ]\n[ trust { on | off } ]\n[ nodeguid eui64 ]\n[ portguid eui64 ] ]\n[ { xdp | xdpgeneric | xdpdrv | xdpoffload } { off |\nobject FILE [ { section | program } NAME ] [ verbose ] |\npinned FILE } ]\n[ master DEVICE ]\n[ nomaster ]\n[ vrf NAME ]\n[ addrgenmode { eui64 | none | stablesecret | random } ]\n[ macaddr [ MACADDR ]\n[ { flush | add | del } MACADDR ]\n[ set MACADDR ] ]\nip link show [ DEVICE | group GROUP ] [ up ] [ master DEVICE ] [ type ETYPE ] [ vrf\nNAME ] [ nomaster ]\nip link xstats type TYPE [ ARGS ]\nip link afstats [ dev DEVICE ]\nip link help [ TYPE ]\nTYPE := [ amt | bareudp | bond | bridge | can | dsa | dummy | erspan | geneve | gre\n| gretap | gtp | hsr | ifb | ip6erspan | ip6gre | ip6gretap | ip6tnl | ipip\n| ipoib | ipvlan | ipvtap | lowpan | macsec | macvlan | macvtap | netdevsim\n| nlmon | rmnet | sit | vcan | veth | virtwifi | vlan | vrf | vti | vxcan\n| vxlan | xfrm ]\nETYPE := [ TYPE | bridgeslave | bondslave ]\nVFVLAN-LIST := [ VFVLAN-LIST ] VFVLAN\nVFVLAN := [ vlan VLANID [ qos VLAN-QOS ] [ proto VLAN-PROTO ] ]\nip link property add dev DEVICE [ altname NAME .. ]\nip link property del dev DEVICE [ altname NAME .. ]",
    "sections": {
        "NAME": {
            "content": "ip-link - network device configuration\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ip link  { COMMAND | help }\n\n\nip link add [ link DEVICE ] [ name ] NAME\n[ txqueuelen PACKETS ]\n[ address LLADDR ] [ broadcast LLADDR ]\n[ mtu MTU ] [ index IDX ]\n[ numtxqueues QUEUECOUNT ] [ numrxqueues QUEUECOUNT ]\n[ gsomaxsize BYTES ] [ gsomaxsegs SEGMENTS ]\n[ gromaxsize BYTES ] [ netns { PID | NETNSNAME } ]\ntype TYPE [ ARGS ]\n\nip link delete { DEVICE | group GROUP } type TYPE [ ARGS ]\n\nip link set { DEVICE | group GROUP }\n[ { up | down } ]\n[ type ETYPE TYPEARGS ]\n[ arp { on | off } ]\n[ dynamic { on | off } ]\n[ multicast { on | off } ]\n[ allmulticast { on | off } ]\n[ promisc { on | off } ]\n[ protodown { on | off } ]\n[ protodownreason PREASON { on | off } ]\n[ trailers { on | off } ]\n[ txqueuelen PACKETS ]\n[ maxgsosize BYTES ] [ maxgsosegs SEGMENTS ] [ maxgrosize BYTES ]\n[ name NEWNAME ]\n[ address LLADDR ]\n[ broadcast LLADDR ]\n[ mtu MTU ]\n[ netns { PID | NETNSNAME } ]\n[ link-netnsid ID ]\n[ alias NAME ]\n[ vf NUM [ mac LLADDR ]\n[ VFVLAN-LIST ]\n[ rate TXRATE ]\n[ maxtxrate TXRATE ]\n[ mintxrate TXRATE ]\n[ spoofchk { on | off } ]\n[ queryrss { on | off } ]\n[ state { auto | enable | disable } ]\n[ trust { on | off } ]\n[ nodeguid eui64 ]\n[ portguid eui64 ] ]\n[ { xdp | xdpgeneric | xdpdrv | xdpoffload } { off |\nobject FILE [ { section | program } NAME ] [ verbose ] |\npinned FILE } ]\n[ master DEVICE ]\n[ nomaster ]\n[ vrf NAME ]\n[ addrgenmode { eui64 | none | stablesecret | random } ]\n[ macaddr [ MACADDR ]\n[ { flush | add | del } MACADDR ]\n[ set MACADDR ] ]\n\nip link show [ DEVICE | group GROUP ] [ up ] [ master DEVICE ] [ type ETYPE ] [ vrf\nNAME ] [ nomaster ]\n\nip link xstats type TYPE [ ARGS ]\n\nip link afstats [ dev DEVICE ]\n\nip link help [ TYPE ]\n\nTYPE := [ amt | bareudp | bond | bridge | can | dsa | dummy | erspan | geneve | gre\n| gretap | gtp | hsr | ifb | ip6erspan | ip6gre | ip6gretap | ip6tnl | ipip\n| ipoib | ipvlan | ipvtap | lowpan | macsec | macvlan | macvtap | netdevsim\n| nlmon | rmnet | sit | vcan | veth | virtwifi | vlan | vrf | vti | vxcan\n| vxlan | xfrm ]\n\nETYPE := [ TYPE | bridgeslave | bondslave ]\n\nVFVLAN-LIST := [ VFVLAN-LIST ] VFVLAN\n\nVFVLAN := [ vlan VLANID [ qos VLAN-QOS ] [ proto VLAN-PROTO ] ]\n\nip link property add dev DEVICE [ altname NAME .. ]\n\nip link property del dev DEVICE [ altname NAME .. ]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "",
            "subsections": [
                {
                    "name": "ip link add - add virtual link",
                    "content": "link DEVICE\nspecifies the physical device to act operate on.\n\nNAME specifies the name of the new virtual device.\n\nTYPE specifies the type of the new device.\n\nLink types:\n\namt - Automatic Multicast Tunneling (AMT)\n\nbareudp - Bare UDP L3 encapsulation support\n\nbond - Bonding device bridge - Ethernet Bridge device\n\ncan - Controller Area Network\n\ndsa - Distributed Switch Architecture\n\ndummy - Dummy network interface\n\nerspan - Encapsulated Remote SPAN over GRE and IPv4\n\ngeneve - GEneric NEtwork Virtualization Encapsulation\n\ngre - Virtual tunnel interface GRE over IPv4\n\ngretap - Virtual L2 tunnel interface GRE over IPv4\n\ngtp - GPRS Tunneling Protocol\n\nhsr - High-availability Seamless Redundancy device\n\nifb - Intermediate Functional Block device\n\nip6erspan - Encapsulated Remote SPAN over GRE and IPv6\n\nip6gre - Virtual tunnel interface GRE over IPv6\n\nip6gretap - Virtual L2 tunnel interface GRE over IPv6\n\nip6tnl - Virtual tunnel interface IPv4|IPv6 over IPv6\n\nipip - Virtual tunnel interface IPv4 over IPv4\n\nipoib - IP over Infiniband device\n\nipvlan - Interface for L3 (IPv6/IPv4) based VLANs\n\nipvtap - Interface for L3 (IPv6/IPv4) based VLANs and TAP\n\nlowpan - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth\n\nmacsec - Interface for IEEE 802.1AE MAC Security (MACsec)\n\nmacvlan - Virtual interface base on link layer address (MAC)\n\nmacvtap - Virtual interface based on link layer address (MAC) and TAP.\n\nnetdevsim - Interface for netdev API tests\n\nnlmon - Netlink monitoring device\n\nrmnet - Qualcomm rmnet device\n\nsit - Virtual tunnel interface IPv6 over IPv4\n\nvcan - Virtual Controller Area Network interface\n\nveth - Virtual ethernet interface\n\nvirtwifi - rtnetlink wifi simulation device\n\nvlan - 802.1q tagged virtual LAN interface\n\nvrf - Interface for L3 VRF domains\n\nvti - Virtual tunnel interface\n\nvxcan - Virtual Controller Area Network tunnel interface\n\nvxlan - Virtual eXtended LAN\n\nxfrm - Virtual xfrm interface\n\n\n\nnumtxqueues QUEUECOUNT\nspecifies the number of transmit queues for new device.\n\n\nnumrxqueues QUEUECOUNT\nspecifies the number of receive queues for new device.\n\n\ngsomaxsize BYTES\nspecifies the recommended maximum size of a Generic Segment Offload packet the new de‐\nvice should accept.\n\n\ngsomaxsegs SEGMENTS\nspecifies the recommended maximum number of a Generic Segment Offload segments the new\ndevice should accept.\n\n\ngromaxsize BYTES\nspecifies the maximum size of a packet built by GRO stack on this device.\n\n\nindex IDX\nspecifies the desired index of the new virtual device. The link creation fails, if the\nindex is busy.\n\n\nnetns { PID | NAME }\nspecifies the desired network namespace to create interface in.\n\n\nVLAN Type Support\nFor a link of type VLAN the following additional arguments are supported:\n\nip  link  add  link DEVICE name NAME type vlan [ protocol VLANPROTO ] id VLANID [ re‐\norderhdr { on | off } ] [ gvrp { on | off } ] [ mvrp { on | off } ] [ loosebinding {\non | off } ] [ bridgebinding { on | off } ] [ ingress-qos-map QOS-MAP ] [ egress-qos-\nmap QOS-MAP ]\n\n\nprotocol VLANPROTO - either 802.1Q or 802.1ad.\n\nid VLANID - specifies the VLAN Identifier to use. Note  that  numbers  with  a\nleading \" 0 \" or \" 0x \" are interpreted as octal or hexadecimal, respectively.\n\nreorderhdr { on | off } - specifies whether ethernet headers are reordered or\nnot (default is on).\n\nIf reorderhdr is on then VLAN header will be not inserted immediately but\nonly  before  passing to the physical device (if this device does not sup‐\nport VLAN offloading), the similar on the RX direction -  by  default  the\npacket  will  be untagged before being received by VLAN device. Reordering\nallows one to accelerate tagging on egress and  to  hide  VLAN  header  on\ningress so the packet looks like regular Ethernet packet, at the same time\nit might be confusing for packet capture as the VLAN header does not exist\nwithin the packet.\n\nVLAN offloading can be checked by ethtool(8):\n\nethtool -k <phydev> | grep tx-vlan-offload\n\nwhere <phydev> is the physical device to which VLAN device is bound.\n\ngvrp  {  on  |  off } - specifies whether this VLAN should be registered using\nGARP VLAN Registration Protocol.\n\nmvrp { on | off } - specifies whether this VLAN  should  be  registered  using\nMultiple VLAN Registration Protocol.\n\nloosebinding  { on | off } - specifies whether the VLAN device state is bound\nto the physical device state.\n\nbridgebinding { on | off } - specifies whether the  VLAN  device  link  state\ntracks the state of bridge ports that are members of the VLAN.\n\ningress-qos-map  QOS-MAP  - defines a mapping of VLAN header prio field to the\nLinux internal packet priority on incoming frames. The format is FROM:TO  with\nmultiple mappings separated by spaces.\n\negress-qos-map  QOS-MAP  - defines a mapping of Linux internal packet priority\nto VLAN header prio field but for outgoing frames. The format is the  same  as\nfor ingress-qos-map.\n\nLinux packet priority can be set by iptables(8):\n\niptables -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4\n\nand  this  \"4\"  priority can be used in the egress qos mapping to set VLAN\nprio \"5\":\n\nip link set veth0.10 type vlan egress 4:5\n\n\nVXLAN Type Support\nFor a link of type VXLAN the following additional arguments are supported:\n\nip link add DEVICE type vxlan id VNI [ dev PHYSDEV  ] [ { group | remote } IPADDR ] [\nlocal { IPADDR | any } ] [ ttl TTL ] [ tos TOS ] [ df DF ] [ flowlabel FLOWLABEL  ]  [\ndstport  PORT  ]  [  srcport  MIN  MAX  ] [ [no]learning ] [ [no]proxy ] [ [no]rsc ] [\n[no]l2miss ] [ [no]l3miss ] [ [no]udpcsum ] [ [no]udp6zerocsumtx  ]  [  [no]udp6zeroc‐\nsumrx  ]  [  ageing SECONDS ] [ maxaddress NUMBER ] [ [no]external ] [ gbp ] [ gpe ] [\n[no]vnifilter ]\n\n\nid VNI - specifies the VXLAN Network Identifier (or VXLAN Segment  Identifier)\nto use.\n\ndev PHYSDEV - specifies the physical device to use for tunnel endpoint commu‐\nnication.\n\n\ngroup  IPADDR  -  specifies  the multicast IP address to join.  This parameter\ncannot be specified with the remote parameter.\n\n\nremote IPADDR - specifies the unicast destination IP address to use in  outgo‐\ning  packets when the destination link layer address is not known in the VXLAN\ndevice forwarding database. This parameter cannot be specified with the  group\nparameter.\n\n\nlocal IPADDR - specifies the source IP address to use in outgoing packets.\n\n\nttl TTL - specifies the TTL value to use in outgoing packets.\n\n\ntos TOS - specifies the TOS value to use in outgoing packets.\n\n\ndf  DF  -  specifies the usage of the Don't Fragment flag (DF) bit in outgoing\npackets with IPv4 headers. The value inherit causes the bit to be copied  from\nthe  original  IP  header. The values unset and set cause the bit to be always\nunset or always set, respectively. By default, the bit is not set.\n\n\nflowlabel FLOWLABEL - specifies the flow label to use in outgoing packets.\n\n\ndstport PORT - specifies the UDP destination port to communicate to the remote\nVXLAN tunnel endpoint.\n\n\nsrcport MIN MAX - specifies the range of port numbers to  use  as  UDP  source\nports to communicate to the remote VXLAN tunnel endpoint.\n\n\n[no]learning  -  specifies  if  unknown source link layer addresses and IP ad‐\ndresses are entered into the VXLAN device forwarding database.\n\n\n[no]rsc - specifies if route short circuit is turned on.\n\n\n[no]proxy - specifies ARP proxy is turned on.\n\n\n[no]l2miss - specifies if netlink LLADDR miss notifications are generated.\n\n\n[no]l3miss - specifies if netlink IP ADDR miss notifications are generated.\n\n\n[no]udpcsum - specifies if UDP checksum is calculated for transmitted  packets\nover IPv4.\n\n\n[no]udp6zerocsumtx  -  skip  UDP  checksum calculation for transmitted packets\nover IPv6.\n\n\n[no]udp6zerocsumrx - allow incoming UDP packets over IPv6 with  zero  checksum\nfield.\n\n\nageing  SECONDS  -  specifies the lifetime in seconds of FDB entries learnt by\nthe kernel.\n\n\nmaxaddress NUMBER - specifies the maximum number of FDB entries.\n\n\n[no]external - specifies whether an external control plane (e.g. ip route  en‐\ncap) or the internal FDB should be used.\n\n\n[no]vnifilter  -  specifies whether the vxlan device is capable of vni filter‐\ning. Only works with a vxlan device with  external  flag  set.  once  enabled,\nbridge  vni  command  is used to manage the vni filtering table on the device.\nThe device can only receive packets with vni's configured in the vni filtering\ntable.\n\n\ngbp - enables the Group Policy extension (VXLAN-GBP).\n\nAllows one to transport group policy context across VXLAN  network  peers.\nIf enabled, includes the mark of a packet in the VXLAN header for outgoing\npackets  and  fills  the packet mark based on the information found in the\nVXLAN header for incoming packets.\n\nFormat of upper 16 bits of packet mark (flags);\n\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n|-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\nD := Don't Learn bit. When set, this bit indicates that the egress  VTEP\nMUST NOT learn the source address of the encapsulated frame.\n\nA  :=  Indicates  that the group policy has already been applied to this\npacket. Policies MUST NOT be applied by devices when the A bit is set.\n\nFormat of lower 16 bits of packet mark (policy ID):\n\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n|        Group Policy ID        |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\nExample:\niptables -A OUTPUT [...] -j MARK --set-mark 0x800FF\n\n\n\ngpe - enables the Generic Protocol extension (VXLAN-GPE). Currently,  this  is\nonly supported together with the external keyword.\n\n\n\nVETH, VXCAN Type Support\nFor a link of types VETH/VXCAN the following additional arguments are supported:\n\nip link add DEVICE type { veth | vxcan } [ peer name NAME ]\n\n\npeer name NAME - specifies the virtual pair device name of the VETH/VXCAN tun‐\nnel.\n\n\n\nIPIP, SIT Type Support\nFor a link of type IPIPorSIT the following additional arguments are supported:\n\nip  link  add DEVICE type { ipip | sit }  remote ADDR local ADDR [ encap { fou | gue |\nnone } ] [ encap-sport { PORT | auto } ] [ encap-dport PORT ] [ [no]encap-csum  ]  [\n[no]encap-remcsum ] [  mode  { ip6ip | ipip | mplsip | any } ] [ external ]\n\n\nremote ADDR - specifies the remote address of the tunnel.\n\n\nlocal  ADDR - specifies the fixed local address for tunneled packets.  It must\nbe an address on another interface on this host.\n\n\nencap { fou | gue | none } - specifies type of  secondary  UDP  encapsulation.\n\"fou\" indicates Foo-Over-UDP, \"gue\" indicates Generic UDP Encapsulation.\n\n\nencap-sport  { PORT | auto } - specifies the source port in UDP encapsulation.\nPORT indicates the port by number,  \"auto\"  indicates  that  the  port  number\nshould be chosen automatically (the kernel picks a flow based on the flow hash\nof the encapsulated packet).\n\n\n[no]encap-csum  -  specifies if UDP checksums are enabled in the secondary en‐\ncapsulation.\n\n\n[no]encap-remcsum - specifies if Remote Checksum Offload is enabled.  This  is\nonly applicable for Generic UDP Encapsulation.\n\n\nmode  {  ip6ip | ipip | mplsip | any } - specifies mode in which device should\nrun. \"ip6ip\"  indicates  IPv6-Over-IPv4,  \"ipip\"  indicates  \"IPv4-Over-IPv4\",\n\"mplsip\"  indicates  MPLS-Over-IPv4,  \"any\"  indicates IPv6, IPv4 or MPLS Over\nIPv4. Supported for SIT where the default is \"ip6ip\" and IPIP  where  the  de‐\nfault is \"ipip\".  IPv6-Over-IPv4 is not supported for IPIP.\n\n\nexternal - make this tunnel externally controlled (e.g. ip route encap).\n\n\nGRE Type Support\nFor a link of type GRE or GRETAP the following additional arguments are supported:\n\nip  link  add  DEVICE type { gre | gretap }  remote ADDR local ADDR [ [no][i|o]seq ] [\n[i|o]key KEY | no[i|o]key ] [ [no][i|o]csum ] [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ]\n[ [no]ignore-df ] [ dev PHYSDEV ] [ encap { fou | gue | none } ] [ encap-sport { PORT\n| auto } ] [ encap-dport PORT ] [ [no]encap-csum ] [ [no]encap-remcsum ] [ external ]\n\n\nremote ADDR - specifies the remote address of the tunnel.\n\n\nlocal ADDR - specifies the fixed local address for tunneled packets.  It  must\nbe an address on another interface on this host.\n\n\n[no][i|o]seq  - serialize packets.  The oseq flag enables sequencing of outgo‐\ning packets.  The iseq flag requires that all input packets are serialized.\n\n\n[i|o]key KEY | no[i|o]key - use keyed GRE with key KEY. KEY is either a number\nor an IPv4 address-like dotted quad.  The key parameter specifies the same key\nto use in both directions.  The ikey and  okey  parameters  specify  different\nkeys for input and output.\n\n\n[no][i|o]csum  -  generate/require  checksums for tunneled packets.  The ocsum\nflag calculates checksums for outgoing packets.  The icsum flag requires  that\nall  input  packets  have the correct checksum. The csum flag is equivalent to\nthe combination icsum ocsum .\n\n\nttl TTL - specifies the TTL value to use in outgoing packets.\n\n\ntos TOS - specifies the TOS value to use in outgoing packets.\n\n\n[no]pmtudisc - enables/disables Path MTU Discovery on this tunnel.  It is  en‐\nabled by default. Note that a fixed ttl is incompatible with this option: tun‐\nneling with a fixed ttl always makes pmtu discovery.\n\n\n[no]ignore-df - enables/disables IPv4 DF suppression on this tunnel.  Normally\ndatagrams  that exceed the MTU will be fragmented; the presence of the DF flag\ninhibits this, resulting instead in an  ICMP  Unreachable  (Fragmentation  Re‐\nquired) message.  Enabling this attribute causes the DF flag to be ignored.\n\n\ndev PHYSDEV - specifies the physical device to use for tunnel endpoint commu‐\nnication.\n\n\nencap  {  fou  | gue | none } - specifies type of secondary UDP encapsulation.\n\"fou\" indicates Foo-Over-UDP, \"gue\" indicates Generic UDP Encapsulation.\n\n\nencap-sport { PORT | auto } - specifies the source port in UDP  encapsulation.\nPORT  indicates  the  port  by  number,  \"auto\" indicates that the port number\nshould be chosen automatically (the kernel picks a flow based on the flow hash\nof the encapsulated packet).\n\n\n[no]encap-csum - specifies if UDP checksums are enabled in the  secondary  en‐\ncapsulation.\n\n\n[no]encap-remcsum  -  specifies if Remote Checksum Offload is enabled. This is\nonly applicable for Generic UDP Encapsulation.\n\n\nexternal - make this tunnel externally controlled (e.g. ip route encap).\n\n\n\nIP6GRE/IP6GRETAP Type Support\nFor a link of type IP6GRE/IP6GRETAP the following additional arguments are supported:\n\nip link add DEVICE type { ip6gre | ip6gretap } remote ADDR local ADDR [ [no][i|o]seq ]\n[ [i|o]key KEY | no[i|o]key ] [ [no][i|o]csum ] [ hoplimit TTL ] [ encaplimit ELIM ] [\ntclass TCLASS ] [ flowlabel FLOWLABEL ] [ dscp inherit ] [ [no]allow-localremote  ]  [\ndev PHYSDEV ] [ external ]\n\n\nremote ADDR - specifies the remote IPv6 address of the tunnel.\n\n\nlocal  ADDR - specifies the fixed local IPv6 address for tunneled packets.  It\nmust be an address on another interface on this host.\n\n\n[no][i|o]seq - serialize packets.  The oseq flag enables sequencing of  outgo‐\ning packets.  The iseq flag requires that all input packets are serialized.\n\n\n[i|o]key KEY | no[i|o]key - use keyed GRE with key KEY. KEY is either a number\nor an IPv4 address-like dotted quad.  The key parameter specifies the same key\nto  use  in  both  directions.  The ikey and okey parameters specify different\nkeys for input and output.\n\n\n[no][i|o]csum - generate/require checksums for tunneled  packets.   The  ocsum\nflag  calculates checksums for outgoing packets.  The icsum flag requires that\nall input packets have the correct checksum. The csum flag  is  equivalent  to\nthe combination icsum ocsum.\n\n\nhoplimit TTL - specifies Hop Limit value to use in outgoing packets.\n\n\nencaplimit ELIM - specifies a fixed encapsulation limit. Default is 4.\n\n\nflowlabel FLOWLABEL - specifies a fixed flowlabel.\n\n\n[no]allow-localremote  - specifies whether to allow remote endpoint to have an\naddress configured on local host.\n\n\ntclass TCLASS - specifies the traffic class field on tunneled  packets,  which\ncan  be  specified  as  either a two-digit hex value (e.g. c0) or a predefined\nstring (e.g. internet).  The value inherit causes the field to be copied  from\nthe  original  IP header. The values inherit/STRING or inherit/00..ff will set\nthe field to STRING or 00..ff when tunneling non-IP packets. The default value\nis 00.\n\n\nexternal - make this tunnel externally controlled (or not, which  is  the  de‐\nfault).   In  the  kernel, this is referred to as collect metadata mode.  This\nflag is mutually exclusive with the remote, local, seq, key,  csum,  hoplimit,\nencaplimit, flowlabel and tclass options.\n\n\n\nIPoIB Type Support\nFor a link of type IPoIB the following additional arguments are supported:\n\nip link add DEVICE name NAME type ipoib [ pkey PKEY ] [ mode MODE ]\n\n\npkey PKEY - specifies the IB P-Key to use.\n\nmode MODE - specifies the mode (datagram or connected) to use.\n\n\nERSPAN Type Support\nFor a link of type ERSPAN/IP6ERSPAN the following additional arguments are supported:\n\nip  link  add  DEVICE  type  { erspan | ip6erspan } remote ADDR local ADDR seq key KEY\nerspanver version [ erspan IDX ] [ erspandir { ingress | egress }  ]  [  erspanhwid\nhwid ] [ [no]allow-localremote ] [ external ]\n\n\nremote ADDR - specifies the remote address of the tunnel.\n\n\nlocal  ADDR - specifies the fixed local address for tunneled packets.  It must\nbe an address on another interface on this host.\n\n\nerspanver version - specifies the ERSPAN version number.   version  indicates\nthe  ERSPAN  version  to  be  created: 0 for version 0 type I, 1 for version 1\n(type II) or 2 for version 2 (type III).\n\n\nerspan IDX - specifies the ERSPAN v1 index field.  IDX indicates a 20 bit  in‐\ndex/port  number  associated  with the ERSPAN traffic's source port and direc‐\ntion.\n\n\nerspandir { ingress | egress } - specifies the ERSPAN v2  mirrored  traffic's\ndirection.\n\n\nerspanhwid  hwid  - an unique identifier of an ERSPAN v2 engine within a sys‐\ntem.  hwid is a 6-bit value for users to configure.\n\n\n[no]allow-localremote - specifies whether to allow remote endpoint to have  an\naddress configured on local host.\n\n\nexternal  -  make  this tunnel externally controlled (or not, which is the de‐\nfault).  In the kernel, this is referred to as collect  metadata  mode.   This\nflag  is  mutually  exclusive  with  the  remote,  local,  erspanver, erspan,\nerspandir and erspanhwid options.\n\n\n\nGENEVE Type Support\nFor a link of type GENEVE the following additional arguments are supported:\n\nip link add DEVICE type geneve id VNI remote IPADDR [ ttl TTL ] [ tos TOS ] [ df DF  ]\n[  flowlabel  FLOWLABEL  ]  [  dstport  PORT  ]  [  [no]external  ]  [ [no]udpcsum ] [\n[no]udp6zerocsumtx ] [ [no]udp6zerocsumrx ] [ innerprotoinherit ]\n\n\nid VNI - specifies the Virtual Network Identifier to use.\n\n\nremote IPADDR - specifies the unicast destination IP address to use in  outgo‐\ning packets.\n\n\nttl  TTL  -  specifies the TTL value to use in outgoing packets. \"0\" or \"auto\"\nmeans use whatever default value, \"inherit\" means inherit the inner protocol's\nttl. Default option is \"0\".\n\n\ntos TOS - specifies the TOS value to use in outgoing packets.\n\n\ndf DF - specifies the usage of the Don't Fragment flag (DF)  bit  in  outgoing\npackets  with IPv4 headers. The value inherit causes the bit to be copied from\nthe original IP header. The values unset and set cause the bit  to  be  always\nunset or always set, respectively. By default, the bit is not set.\n\n\nflowlabel FLOWLABEL - specifies the flow label to use in outgoing packets.\n\n\ndstport PORT - select a destination port other than the default of 6081.\n\n\n[no]external  -  make  this tunnel externally controlled (or not, which is the\ndefault). This flag is mutually exclusive with the id, remote,  ttl,  tos  and\nflowlabel options.\n\n\n[no]udpcsum  - specifies if UDP checksum is calculated for transmitted packets\nover IPv4.\n\n\n[no]udp6zerocsumtx - skip UDP checksum  calculation  for  transmitted  packets\nover IPv6.\n\n\n[no]udp6zerocsumrx  -  allow incoming UDP packets over IPv6 with zero checksum\nfield.\n\n\ninnerprotoinherit - use IPv4/IPv6 as inner protocol instead of Ethernet.\n\n\n\nBareudp Type Support\nFor a link of type Bareudp the following additional arguments are supported:\n\nip link add DEVICE type bareudp dstport PORT ethertype PROTO [  srcportmin  PORT  ]  [\n[no]multiproto ]\n\n\ndstport PORT - specifies the destination port for the UDP tunnel.\n\n\nethertype  PROTO - specifies the ethertype of the L3 protocol being tunnelled.\nethertype can be given as plain Ethernet protocol number or using the protocol\nname (\"ipv4\", \"ipv6\", \"mplsuc\", etc.).\n\n\nsrcportmin PORT - selects the lowest value  of  the  UDP  tunnel  source  port\nrange.\n\n\n[no]multiproto  - activates support for protocols similar to the one specified\nby ethertype.  When ethertype is \"mplsuc\" (that is, unicast MPLS),  this  al‐\nlows the tunnel to also handle multicast MPLS.  When ethertype is \"ipv4\", this\nallows the tunnel to also handle IPv6. This option is disabled by default.\n\n\nAMT Type Support\nFor a link of type AMT the following additional arguments are supported:\n\nip link add DEVICE type AMT discovery IPADDR mode { gateway | relay } local IPADDR dev\nPHYSDEV [ relayport PORT ] [ gatewayport PORT ] [ maxtunnels NUMBER ]\n\n\ndiscovery  IPADDR  - specifies the unicast discovery IP address to use to find\nremote IP address.\n\nmode { gateway | relay } - specifies the role of AMT, Gateway or Relay\n\nlocal IPADDR - specifies the source IP address to use in outgoing packets.\n\ndev PHYSDEV - specifies the underlying physical interface from  which  trans‐\nform traffic is sent and received.\n\nrelayport PORT - specifies the UDP Relay port to communicate to the Relay.\n\ngatewayport PORT - specifies the UDP Gateway port to communicate to the Gate‐\nway.\n\nmaxtunnels NUMBER - specifies the maximum number of tunnels.\n\n\n\nMACVLAN and MACVTAP Type Support\nFor  a  link  of  type  MACVLAN or MACVTAP the following additional arguments are sup‐\nported:\n\nip link add link DEVICE name NAME type { macvlan | macvtap } mode { private |  vepa  |\nbridge | passthru  [ nopromisc ] | source [ nodst ] }  [ bcqueuelen { LENGTH } ]\n\n\ntype  { macvlan | macvtap } - specifies the link type to use.  macvlan creates\njust a virtual interface, while macvtap in addition creates a character device\n/dev/tapX to be used just like a tuntap device.\n\nmode private - Do not allow communication between  macvlan  instances  on  the\nsame physical interface, even if the external switch supports hairpin mode.\n\nmode  vepa  - Virtual Ethernet Port Aggregator mode. Data from one macvlan in‐\nstance to the other on the same physical interface  is  transmitted  over  the\nphysical  interface. Either the attached switch needs to support hairpin mode,\nor there must be a TCP/IP router forwarding the packets in order to allow com‐\nmunication. This is the default mode.\n\nmode bridge - In bridge mode, all endpoints are  directly  connected  to  each\nother, communication is not redirected through the physical interface's peer.\n\nmode passthru [ nopromisc ] - This mode gives more power to a single endpoint,\nusually  in  macvtap mode. It is not allowed for more than one endpoint on the\nsame physical interface. All traffic will be forwarded to this  endpoint,  al‐\nlowing virtio guests to change MAC address or set promiscuous mode in order to\nbridge  the interface or create vlan interfaces on top of it. By default, this\nmode forces the underlying interface into promiscuous mode.  Passing  the  no‐\npromisc  flag prevents this, so the promisc flag may be controlled using stan‐\ndard tools.\n\nmode source [ nodst ] - allows one to set a list of allowed mac address, which\nis used to match against source mac address from received frames on underlying\ninterface. This allows creating mac based VLAN associations, instead of  stan‐\ndard  port  or tag based. The feature is useful to deploy 802.1x mac based be‐\nhavior, where drivers of underlying interfaces doesn't  allows  that.  By  de‐\nfault, packets are also considered (duplicated) for destination-based MACVLAN.\nPassing the nodst flag stops matching packets from also going through the des‐\ntination-based flow.\n\nbcqueuelen  { LENGTH } - Set the length of the RX queue used to process broad‐\ncast and multicast packets.  LENGTH must be a positive integer  in  the  range\n[0-4294967295].   Setting  a  length  of  0  will  effectively drop all broad‐\ncast/multicast traffic.  If not specified the macvlan driver default (1000) is\nused.  Note that all macvlans that share the same underlying device are  using\nthe  same queue. The parameter here is a request, the actual queue length used\nwill be the maximum length that any macvlan  interface  has  requested.   When\nlisting  device parameters both the bcqueuelen parameter as well as the actual\nused bcqueuelen are listed to better help the user understand the setting.\n\n\nHigh-availability Seamless Redundancy (HSR) Support\nFor a link of type HSR the following additional arguments are supported:\n\nip link add link DEVICE name NAME type hsr slave1 SLAVE1-IF slave2 SLAVE2-IF [  super‐\nvision ADDR-BYTE ] [ version { 0 | 1 } [ proto { 0 | 1 } ]\n\n\ntype hsr - specifies the link type to use, here HSR.\n\nslave1 SLAVE1-IF - Specifies the physical device used for the first of the two\nring ports.\n\nslave2  SLAVE2-IF  -  Specifies the physical device used for the second of the\ntwo ring ports.\n\nsupervision ADDR-BYTE - The last byte of the multicast address  used  for  HSR\nsupervision frames.  Default option is \"0\", possible values 0-255.\n\nversion { 0 | 1 } - Selects the protocol version of the interface. Default op‐\ntion is \"0\", which corresponds to the 2010 version of the HSR standard. Option\n\"1\" activates the 2012 version.\n\nproto  {  0  |  1 } - Selects the protocol at the interface. Default option is\n\"0\", which corresponds to the HSR standard. Option \"1\" activates the  Parallel\nRedundancy Protocol (PRP).\n\n\nBRIDGE Type Support\nFor a link of type BRIDGE the following additional arguments are supported:\n\nip  link  add DEVICE type bridge [ ageingtime AGEINGTIME ] [ groupfwdmask MASK ] [\ngroupaddress ADDRESS ] [ forwarddelay FORWARDDELAY ] [ hellotime  HELLOTIME  ]  [\nmaxage  MAXAGE  ] [ stpstate STPSTATE ] [ priority PRIORITY ] [ nolinklocallearn\nNOLINKLOCALLEARN ] [ vlanfiltering VLANFILTERING ] [ vlanprotocol VLANPROTOCOL ]\n[ vlandefaultpvid VLANDEFAULTPVID ] [ vlanstatsenabled  VLANSTATSENABLED  ]  [\nvlanstatsperport  VLANSTATSPERPORT  ]  [  mcastsnooping  MULTICASTSNOOPING ] [\nmcastvlansnooping MULTICASTVLANSNOOPING ]  [  mcastrouter  MULTICASTROUTER  ]  [\nmcastqueryuseifaddr  MCASTQUERYUSEIFADDR ] [ mcastquerier MULTICASTQUERIER ] [\nmcasthashelasticity HASHELASTICITY ] [ mcasthashmax HASHMAX ] [  mcastlastmem‐\nbercount  LASTMEMBERCOUNT  ]  [  mcaststartupquerycount  STARTUPQUERYCOUNT ] [\nmcastlastmemberinterval LASTMEMBERINTERVAL ] [ mcastmembershipinterval  MEMBER‐\nSHIPINTERVAL  ]  [  mcastquerierinterval  QUERIERINTERVAL ] [ mcastqueryinterval\nQUERYINTERVAL  ]  [   mcastqueryresponseinterval   QUERYRESPONSEINTERVAL   ]   [\nmcaststartupqueryinterval    STARTUPQUERYINTERVAL    ]    [   mcaststatsenabled\nMCASTSTATSENABLED ] [ mcastigmpversion IGMPVERSION ] [ mcastmldversion MLDVER‐\nSION ] [ nfcalliptables NFCALLIPTABLES ] [ nfcallip6tables NFCALLIP6TABLES ] [\nnfcallarptables NFCALLARPTABLES ]\n\n\nageingtime AGEINGTIME - configure the bridge's FDB entries ageing  time,  ie\nthe number of seconds a MAC address will be kept in the FDB after a packet has\nbeen  received  from  that  address.  after  this time has passed, entries are\ncleaned up.\n\ngroupfwdmask MASK - set the group forward mask. This is the bitmask that  is\napplied  to  decide  whether to forward incoming frames destined to link-local\naddresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to 0,  ie  the\nbridge does not forward any link-local frames).\n\ngroupaddress ADDRESS - set the MAC address of the multicast group this bridge\nuses  for  STP.  The address must be a link-local address in standard Ethernet\nMAC address format, ie an address of the form 01:80:C2:00:00:0X, with X\nin [0, 4..f].\n\nforwarddelay FORWARDDELAY - set the forwarding delay in seconds, ie the time\nspent in LISTENING state (before moving to LEARNING)  and  in  LEARNING  state\n(before  moving  to FORWARDING). Only relevant if STP is enabled. Valid values\nare between 2 and 30.\n\nhellotime HELLOTIME - set the time in seconds between hello packets sent  by\nthe  bridge,  when it is a root bridge or a designated bridges.  Only relevant\nif STP is enabled. Valid values are between 1 and 10.\n\nmaxage MAXAGE - set the hello packet timeout, ie the time in  seconds  until\nanother  bridge in the spanning tree is assumed to be dead, after reception of\nits last hello message. Only relevant if STP is enabled. Valid values are  be‐\ntween 6 and 40.\n\nstpstate  STPSTATE  -  turn spanning tree protocol on (STPSTATE > 0) or off\n(STPSTATE == 0).  for this bridge.\n\npriority PRIORITY - set this bridge's spanning tree priority, used during  STP\nroot bridge election.  PRIORITY is a 16bit unsigned integer.\n\nnolinklocallearn  NOLINKLOCALLEARN  - turn link-local learning on (NOLIN‐\nKLOCALLEARN == 0) or off (NOLINKLOCALLEARN > 0).  When disabled, the bridge\nwill not learn from link-local frames (default: enabled).\n\nvlanfiltering VLANFILTERING - turn VLAN filtering on (VLANFILTERING > 0) or\noff (VLANFILTERING == 0).  When disabled, the bridge will  not  consider  the\nVLAN tag when handling packets.\n\nvlanprotocol { 802.1Q | 802.1ad } - set the protocol used for VLAN filtering.\n\nvlandefaultpvid  VLANDEFAULTPVID  -  set the default PVID (native/untagged\nVLAN ID) for this bridge.\n\nvlanstatsenabled VLANSTATSENABLED - enable (VLANSTATSENABLED  ==  1)  or\ndisable (VLANSTATSENABLED == 0) per-VLAN stats accounting.\n\nvlanstatsperport VLANSTATSPERPORT - enable (VLANSTATSPERPORT == 1) or\ndisable  (VLANSTATSPERPORT == 0) per-VLAN per-port stats accounting. Can be\nchanged only when there are no port VLANs configured.\n\nmcastsnooping  MULTICASTSNOOPING  -  turn  multicast  snooping  on   (MULTI‐\nCASTSNOOPING > 0) or off (MULTICASTSNOOPING == 0).\n\nmcastvlansnooping  MULTICASTVLANSNOOPING - turn multicast VLAN snooping on\n(MULTICASTVLANSNOOPING > 0) or off (MULTICASTVLANSNOOPING == 0).\n\nmcastrouter MULTICASTROUTER - set bridge's multicast router if IGMP snooping\nis enabled.  MULTICASTROUTER is an integer value having the  following  mean‐\ning:\n\n0 - disabled.\n\n1 - automatic (queried).\n\n2 - permanently enabled.\n\nmcastqueryuseifaddr  MCASTQUERYUSEIFADDR  -  whether to use the bridge's\nown IP address as source address for IGMP queries (MCASTQUERYUSEIFADDR > 0)\nor the default of 0.0.0.0 (MCASTQUERYUSEIFADDR == 0).\n\nmcastquerier MULTICASTQUERIER - enable (MULTICASTQUERIER >  0)  or  disable\n(MULTICASTQUERIER  == 0) IGMP querier, ie sending of multicast queries by the\nbridge (default: disabled).\n\nmcastquerierinterval QUERIERINTERVAL - interval  between  queries  sent  by\nother  routers. if no queries are seen after this delay has passed, the bridge\nwill start to send its own queries (as if mcastquerier was enabled).\n\nmcasthashelasticity HASHELASTICITY - set multicast database  hash  elastic‐\nity, ie the maximum chain length in the multicast hash table (defaults to 4).\n\nmcasthashmax  HASHMAX  - set maximum size of multicast hash table (defaults\nto 512, value must be a power of 2).\n\nmcastlastmembercount LASTMEMBERCOUNT - set multicast last  member  count,\nie  the  number  of  queries the bridge will send before stopping forwarding a\nmulticast group after a \"leave\" message has been received (defaults to 2).\n\nmcastlastmemberinterval LASTMEMBERINTERVAL - interval between queries  to\nfind remaining members of a group, after a \"leave\" message is received.\n\nmcaststartupquerycount STARTUPQUERYCOUNT - set the number of IGMP queries\nto send during startup phase (defaults to 2).\n\nmcaststartupqueryinterval STARTUPQUERYINTERVAL - interval between queries\nin the startup phase.\n\nmcastqueryinterval  QUERYINTERVAL  -  interval  between queries sent by the\nbridge after the end of the startup phase.\n\nmcastqueryresponseinterval QUERYRESPONSEINTERVAL - set the  Max  Response\nTime/Maximum Response Delay for IGMP/MLD queries sent by the bridge.\n\nmcastmembershipinterval  MEMBERSHIPINTERVAL  - delay after which the bridge\nwill leave a group, if no membership reports for this group are received.\n\nmcaststatsenabled MCASTSTATSENABLED - enable (MCASTSTATSENABLED > 0)  or\ndisable (MCASTSTATSENABLED == 0) multicast (IGMP/MLD) stats accounting.\n\nmcastigmpversion IGMPVERSION - set the IGMP version.\n\nmcastmldversion MLDVERSION - set the MLD version.\n\nnfcalliptables  NFCALLIPTABLES  - enable (NFCALLIPTABLES > 0) or disable\n(NFCALLIPTABLES == 0) iptables hooks on the bridge.\n\nnfcallip6tables NFCALLIP6TABLES - enable (NFCALLIP6TABLES > 0)  or  dis‐\nable (NFCALLIP6TABLES == 0) ip6tables hooks on the bridge.\n\nnfcallarptables  NFCALLARPTABLES  - enable (NFCALLARPTABLES > 0) or dis‐\nable (NFCALLARPTABLES == 0) arptables hooks on the bridge.\n\n\n\n\nMACsec Type Support\nFor a link of type MACsec the following additional arguments are supported:\n\nip link add link DEVICE name NAME type macsec [ [ address <lladdr> ] port PORT  |  sci\nSCI ] [ cipher CIPHERSUITE ] [ icvlen { 8..16 } ] [ encrypt { on | off } ] [ sendsci\n{  on | off } ] [ endstation { on | off } ] [ scb { on | off } ] [ protect { on | off\n} ] [ replay { on | off } window { 0..2^32-1 } ] [ validate { strict |  check  |  dis‐\nabled } ] [ encodingsa { 0..3 } ]\n\n\naddress  <lladdr> - sets the system identifier component of secure channel for\nthis MACsec device.\n\n\nport PORT - sets the port number component of secure channel for  this  MACsec\ndevice,  in a range from 1 to 65535 inclusive. Numbers with a leading \" 0 \" or\n\" 0x \" are interpreted as octal and hexadecimal, respectively.\n\n\nsci SCI - sets the secure channel identifier for this MACsec device.  SCI is a\n64bit wide number in hexadecimal format.\n\n\ncipher CIPHERSUITE - defines the cipher suite to use.\n\n\nicvlen LENGTH - sets the length of the Integrity Check Value (ICV).\n\n\nencrypt on or encrypt off - switches between authenticated encryption, or  au‐\nthenticity mode only.\n\n\nsendsci  on  or sendsci off - specifies whether the SCI is included in every\npacket, or only when it is necessary.\n\n\nendstation on or endstation off - sets the End Station bit.\n\n\nscb on or scb off - sets the Single Copy Broadcast bit.\n\n\nprotect on or protect off - enables MACsec protection on the device.\n\n\nreplay on or replay off - enables replay protection on the device.\n\n\n\nwindow SIZE - sets the size of the replay window.\n\n\n\nvalidate strict or validate check or validate disabled - sets  the  validation\nmode on the device.\n\n\nencodingsa AN - sets the active secure association for transmission.\n\n\n\nVRF Type Support\nFor a link of type VRF the following additional arguments are supported:\n\nip link add DEVICE type vrf table TABLE\n\n\ntable table id associated with VRF device\n\n\n\nRMNET Type Support\nFor a link of type RMNET the following additional arguments are supported:\n\nip link add link DEVICE name NAME type rmnet muxid MUXID\n\n\nmuxid  MUXID  -  specifies  the mux identifier for the rmnet device, possible\nvalues 1-254.\n\n\n\nXFRM Type Support\nFor a link of type XFRM the following additional arguments are supported:\n\nip link add DEVICE type xfrm dev PHYSDEV [ ifid IFID ] [ external ]\n\n\ndev PHYSDEV - specifies the underlying physical interface from  which  trans‐\nform traffic is sent and received.\n\n\nifid IF-ID - specifies the hexadecimal lookup key used to send traffic to and\nfrom specific xfrm policies. Policies must be configured with the same key. If\nnot  set, the key defaults to 0 and will match any policies which similarly do\nnot have a lookup key configuration.\n\n\nexternal - make this device externally controlled. This flag is  mutually  ex‐\nclusive with the dev and ifid options.\n\n\n\nGTP Type Support\nFor a link of type GTP the following additional arguments are supported:\n\nip link add DEVICE type gtp role ROLE hsize HSIZE\n\n\nrole ROLE - specifies the role of the GTP device, either sgsn or ggsn\n\n\nhsize HSIZE - specifies size of the hashtable which stores PDP contexts\n\n\nrestartcount RESTARTCOUNT - GTP instance restart counter\n\n\n"
                },
                {
                    "name": "ip link delete - delete virtual link",
                    "content": "dev DEVICE\nspecifies the virtual device to act operate on.\n\n\ngroup GROUP\nspecifies  the  group of virtual links to delete. Group 0 is not allowed to be deleted\nsince it is the default group.\n\n\ntype TYPE\nspecifies the type of the device.\n\n"
                },
                {
                    "name": "ip link set - change device attributes",
                    "content": "Warning: If multiple parameter changes are requested, ip aborts immediately after any of  the\nchanges  have  failed.  This is the only case when ip can move the system to an unpredictable\nstate. The solution is to avoid changing several parameters with one ip link set  call.   The\nmodifier change is equivalent to set.\n\n\n\ndev DEVICE\nDEVICE  specifies  network device to operate on. When configuring SR-IOV Virtual Func‐\ntion (VF) devices, this keyword should specify the associated Physical  Function  (PF)\ndevice.\n\n\ngroup GROUP\nGROUP  has a dual role: If both group and dev are present, then move the device to the\nspecified group. If only a group is specified, then the command operates  on  all  de‐\nvices in that group.\n\n\nup and down\nchange the state of the device to UP or DOWN.\n\n\narp on or arp off\nchange the NOARP flag on the device.\n\n\nmulticast on or multicast off\nchange the MULTICAST flag on the device.\n\n\nallmulticast on or allmulticast off\nchange  the ALLMULTI flag on the device. When enabled, instructs network driver to re‐\ntrieve all multicast packets from the network to the kernel for further processing.\n\n\npromisc on or promisc off\nchange the PROMISC flag on the device. When enabled, activates  promiscuous  operation\nof the network device.\n\n\ntrailers on or trailers off\nchange  the  NOTRAILERS  flag  on the device, NOT used by the Linux and exists for BSD\ncompatibility.\n\n\nprotodown on or protodown off\nchange the PROTODOWN state on the device. Indicates that a protocol error has been de‐\ntected on the port. Switch drivers can react to this error by doing a phys down on the\nswitch port.\n\n\nprotodownreason PREASON on or off\nset PROTODOWN reasons on the device. protodown reason bit names can be enumerated  un‐\nder /etc/iproute2/protodownreasons.d/. possible reasons bits 0-31\n\n\ndynamic on or dynamic off\nchange  the  DYNAMIC flag on the device. Indicates that address can change when inter‐\nface goes down (currently NOT used by the Linux).\n\n\nname NAME\nchange the name of the device. This operation is not recommended if the device is run‐\nning or has some addresses already configured.\n\n\ntxqueuelen NUMBER\n\ntxqlen NUMBER\nchange the transmit queue length of the device.\n\n\nmtu NUMBER\nchange the MTU of the device.\n\n\naddress LLADDRESS\nchange the station address of the interface.\n\n\nbroadcast LLADDRESS\n\nbrd LLADDRESS\n\npeer LLADDRESS\nchange the link layer broadcast address or the peer  address  when  the  interface  is\nPOINTOPOINT.\n\n\nnetns NETNSNAME | PID\nmove  the  device  to  the network namespace associated with name NETNSNAME or process\nPID.\n\nSome devices are not allowed to change network namespace: loopback, bridge,  wireless.\nThese  are  network namespace local devices. In such case ip tool will return \"Invalid\nargument\" error. It is possible to find out if device is local  to  a  single  network\nnamespace by checking netns-local flag in the output of the ethtool:\n\nethtool -k DEVICE\n\nTo  change  network namespace for wireless devices the iw tool can be used. But it al‐\nlows one to change network namespace only for physical devices and by process PID.\n\n\nalias NAME\ngive the device a symbolic name for easy reference.\n\n\ngroup GROUP\nspecify the group the device belongs to.  The available  groups  are  listed  in  file\n/etc/iproute2/group.\n\n\nvf NUM specify  a  Virtual Function device to be configured. The associated PF device must be\nspecified using the dev parameter.\n\nmac LLADDRESS - change the station address for the specified VF. The vf  para‐\nmeter must be specified.\n\n\nvlan  VLANID  - change the assigned VLAN for the specified VF. When specified,\nall traffic sent from the VF will be tagged with the specified VLAN ID. Incom‐\ning traffic will be filtered for the specified VLAN ID, and will have all VLAN\ntags stripped before being passed to the VF. Setting this parameter to 0  dis‐\nables VLAN tagging and filtering. The vf parameter must be specified.\n\n\nqos  VLAN-QOS  - assign VLAN QOS (priority) bits for the VLAN tag. When speci‐\nfied, all VLAN tags transmitted by the VF will include the specified  priority\nbits in the VLAN tag. If not specified, the value is assumed to be 0. Both the\nvf  and vlan parameters must be specified. Setting both vlan and qos as 0 dis‐\nables VLAN tagging and filtering for the VF.\n\n\nproto VLAN-PROTO - assign VLAN PROTOCOL for the VLAN  tag,  either  802.1Q  or\n802.1ad.  Setting to 802.1ad, all traffic sent from the VF will be tagged with\nVLAN  S-Tag.   Incoming  traffic  will  have VLAN S-Tags stripped before being\npassed to the VF.  Setting to 802.1ad also enables an  option  to  concatenate\nanother VLAN tag, so both S-TAG and C-TAG will be inserted/stripped for outgo‐\ning/incoming traffic, respectively.  If not specified, the value is assumed to\nbe 802.1Q. Both the vf and vlan parameters must be specified.\n\n\nrate  TXRATE -- change the allowed transmit bandwidth, in Mbps, for the speci‐\nfied VF.  Setting this parameter to 0 disables rate  limiting.   vf  parameter\nmust be specified.  Please use new API maxtxrate option instead.\n\n\nmaxtxrate  TXRATE  - change the allowed maximum transmit bandwidth, in Mbps,\nfor the specified VF.  Setting this parameter to 0 disables rate limiting.  vf\nparameter must be specified.\n\n\nmintxrate TXRATE - change the allowed minimum transmit bandwidth,  in  Mbps,\nfor  the  specified  VF.   Minimum  TXRATE should be always <= Maximum TXRATE.\nSetting this parameter to 0 disables rate  limiting.   vf  parameter  must  be\nspecified.\n\n\nspoofchk on|off - turn packet spoof checking on or off for the specified VF.\n\nqueryrss  on|off  - toggle the ability of querying the RSS configuration of a\nspecific VF. VF RSS information like RSS hash key may be considered  sensitive\non  some  devices  where this information is shared between VF and PF and thus\nits querying may be prohibited by default.\n\nstate auto|enable|disable - set the virtual link state as seen by  the  speci‐\nfied  VF. Setting to auto means a reflection of the PF link state, enable lets\nthe VF to communicate with other VFs on this host even if the PF link state is\ndown, disable causes the HW to drop any packets sent by the VF.\n\ntrust on|off - trust the specified VF user. This enables that VF user can  set\na specific feature which may impact security and/or performance. (e.g. VF mul‐\nticast promiscuous mode)\n\nnodeguid eui64 - configure node GUID for Infiniband VFs.\n\nportguid eui64 - configure port GUID for Infiniband VFs.\n\n"
                },
                {
                    "name": "xdp object | pinned | off",
                    "content": "set  (or unset) a XDP (\"eXpress Data Path\") BPF program to run on every packet at dri‐\nver level.  ip link output will indicate a xdp flag for the networking device. If  the\ndriver  does  not have native XDP support, the kernel will fall back to a slower, dri‐\nver-independent \"generic\" XDP variant. The ip link output will in that  case  indicate\nxdpgeneric  instead  of  xdp only. If the driver does have native XDP support, but the\nprogram is loaded under xdpgeneric object |  pinned  then  the  kernel  will  use  the\ngeneric  XDP variant instead of the native one.  xdpdrv has the opposite effect of re‐\nquestsing that the automatic fallback to the generic XDP variant be  disabled  and  in\ncase  driver  is not XDP-capable error should be returned.  xdpdrv also disables hard‐\nware offloads.  xdpoffload in ip link output indicates that the program has  been  of‐\nfloaded to hardware and can also be used to request the \"offload\" mode, much like xdp‐\ngeneric it forces program to be installed specifically in HW/FW of the apater.\n\noff  (or  none  ) - Detaches any currently attached XDP/BPF program from the given de‐\nvice.\n\nobject FILE - Attaches a XDP/BPF program to the given device. The FILE points to a BPF\nELF file (f.e. generated by LLVM) that contains the BPF program code,  map  specifica‐\ntions,  etc.  If  a  XDP/BPF program is already attached to the given device, an error\nwill be thrown. If no XDP/BPF program is currently attached, the device  supports  XDP\nand  the program from the BPF ELF file passes the kernel verifier, then it will be at‐\ntached to the device. If the option -force is passed to ip  then  any  prior  attached\nXDP/BPF  program  will  be  atomically  overridden and no error will be thrown in this\ncase. If no section option is passed, then the default section name (\"prog\")  will  be\nassumed,  otherwise  the  provided  section name will be used. If no verbose option is\npassed, then a verifier log will only be dumped on load error.  See also EXAMPLES sec‐\ntion for usage examples.\n\nsection NAME - Specifies a section name that contains the BPF program code. If no sec‐\ntion name is specified, the default one (\"prog\") will be used. This option  is  to  be\npassed with the object option.\n\nprogram  NAME - Specifies the BPF program name that need to be attached. When the pro‐\ngram name is specified, the section name parameter will be ignored. This  option  only\nworks when iproute2 build with libbpf support.\n\nverbose  -  Act in verbose mode. For example, even in case of success, this will print\nthe verifier log in case a program was loaded from a BPF ELF file.\n\npinned FILE - Attaches a XDP/BPF program to the given device. The FILE  points  to  an\nalready  pinned  BPF  program in the BPF file system. The option section doesn't apply\nhere, but otherwise semantics are the same as with the  option  object  described  al‐\nready.\n\n\nmaster DEVICE\nset master device of the device (enslave device).\n\n"
                },
                {
                    "name": "nomaster",
                    "content": "unset master device of the device (release device).\n\n\naddrgenmode eui64|none|stablesecret|random\nset the IPv6 address generation mode\n\neui64 - use a Modified EUI-64 format interface identifier\n\nnone - disable automatic address generation\n\nstablesecret - generate the interface identifier based on a preset\n/proc/sys/net/ipv6/conf/{default,DEVICE}/stablesecret\n\nrandom - like stablesecret, but auto-generate a new random secret if none is set\n\n"
                },
                {
                    "name": "link-netnsid",
                    "content": "set peer netnsid for a cross-netns interface\n\n\ntype ETYPE TYPEARGS\nChange  type-specific  settings.  For a list of supported types and arguments refer to\nthe description of ip link add above. In addition to that, it is possible  to  manipu‐\nlate settings to slave devices:\n\n\nBridge Slave Support\nFor a link with master bridge the following additional arguments are supported:\n\nip  link  set type bridgeslave [ fdbflush ] [ state STATE ] [ priority PRIO ] [ cost\nCOST ] [ guard { on | off } ] [ hairpin { on | off } ] [ fastleave { on | off  }  ]  [\nrootblock { on | off } ] [ learning { on | off } ] [ flood { on | off } ] [ proxyarp\n{  on  |  off  } ] [ proxyarpwifi { on | off } ] [ mcastrouter MULTICASTROUTER ] [\nmcastfastleave { on | off} ] [ bcastflood { on | off } ] [ mcastflood { on | off }\n] [ mcasttounicast { on | off } ] [ groupfwdmask MASK ] [ neighsuppress  {  on  |\noff  }  ] [ vlantunnel { on | off } ] [ isolated { on | off } ] [ locked { on | off }\nbackupport DEVICE ] [ nobackupport ]\n\n\nfdbflush - flush bridge slave's fdb dynamic entries.\n\nstate STATE - Set port state.  STATE is a number  representing  the  following\nstates:  0  (disabled), 1 (listening), 2 (learning), 3 (forwarding), 4 (block‐\ning).\n\npriority PRIO - set port priority (allowed values are between 0 and 63, inclu‐\nsively).\n\ncost COST - set port cost (allowed values are  between  1  and  65535,  inclu‐\nsively).\n\nguard { on | off } - block incoming BPDU packets on this port.\n\nhairpin  {  on | off } - enable hairpin mode on this port. This will allow in‐\ncoming packets on this port to be reflected back.\n\nfastleave { on | off } - enable multicast fast leave on this port.\n\nrootblock { on | off } - block this port  from  becoming  the  bridge's  root\nport.\n\nlearning { on | off } - allow MAC address learning on this port.\n\nflood  { on | off } - open the flood gates on this port, i.e. forward all uni‐\ncast frames to this port also. Requires proxyarp  and  proxyarpwifi  to  be\nturned off.\n\nproxyarp { on | off } - enable proxy ARP on this port.\n\nproxyarpwifi  {  on  | off } - enable proxy ARP on this port which meets ex‐\ntended requirements by IEEE 802.11 and Hotspot 2.0 specifications.\n\nmcastrouter MULTICASTROUTER -  configure  this  port  for  having  multicast\nrouters  attached.  A  port with a multicast router will receive all multicast\ntraffic.  MULTICASTROUTER may be either 0 to  disable  multicast  routers  on\nthis port, 1 to let the system detect the presence of routers (this is the de‐\nfault), 2 to permanently enable multicast traffic forwarding on this port or 3\nto  enable multicast routers temporarily on this port, not depending on incom‐\ning queries.\n\nmcastfastleave { on | off } - this is a  synonym  to  the  fastleave  option\nabove.\n\nbcastflood { on | off } - controls flooding of broadcast traffic on the given\nport. By default this flag is on.\n\nmcastflood  { on | off } - controls whether a given port will flood multicast\ntraffic for which there is no MDB entry. By default this flag is on.\n\nmcasttounicast { on | off } - controls whether a given port  will  replicate\npackets using unicast instead of multicast. By default this flag is off.\n\ngroupfwdmask  MASK - set the group forward mask. This is the bitmask that is\napplied to decide whether to forward incoming frames  destined  to  link-local\naddresses,  ie  addresses of the form 01:80:C2:00:00:0X (defaults to 0, ie the\nbridge does not forward any link-local frames coming on this port).\n\nneighsuppress { on | off } - controls whether neigh discovery  (arp  and  nd)\nproxy and suppression is enabled on the port. By default this flag is off.\n\nvlantunnel  { on | off } - controls whether vlan to tunnel mapping is enabled\non the port. By default this flag is off.\n\nlocked { on | off } - sets or unsets a port in locked mode, so that  when  en‐\nabled,  hosts behind the port cannot communicate through the port unless a FDB\nentry representing the host is in the FDB. By default this flag is off.\n\nbackupport DEVICE - if the port loses carrier all traffic will be  redirected\nto the configured backup port\n\nnobackupport - removes the currently configured backup port\n\n\n\nBonding Slave Support\nFor a link with master bond the following additional arguments are supported:\n\nip link set type bondslave [ queueid ID ] [ prio PRIORITY ]\n\n\nqueueid ID - set the slave's queue ID (a 16bit unsigned value).\n\n\nprio  PRIORITY - set the slave's priority for active slave re-selection during\nfailover (a 32bit signed value). This option only valid for  active-backup(1),\nbalance-tlb (5) and balance-alb (6) mode.\n\n\n\nMACVLAN and MACVTAP Support\nModify list of allowed macaddr for link in source mode.\n\nip link set type { macvlan | macvap } [ macaddr COMMAND MACADDR ...  ]\n\nCommands:\nadd - add MACADDR to allowed list\n\nset - replace allowed list\n\ndel - remove MACADDR from allowed list\n\nflush - flush whole allowed list\n\n\nUpdate the broadcast/multicast queue length.\n\nip link set type { macvlan | macvap } [ bcqueuelen  LENGTH ]\n\nbcqueuelen  LENGTH  - Set the length of the RX queue used to process broadcast\nand multicast packets.  LENGTH  must  be  a  positive  integer  in  the  range\n[0-4294967295].   Setting  a  length  of  0  will  effectively drop all broad‐\ncast/multicast traffic.  If not specified the macvlan driver default (1000) is\nused.  Note that all macvlans that share the same underlying device are  using\nthe  same queue. The parameter here is a request, the actual queue length used\nwill be the maximum length that any macvlan  interface  has  requested.   When\nlisting  device parameters both the bcqueuelen parameter as well as the actual\nused bcqueuelen are listed to better help the user understand the setting.\n\n\nDSA user port support\nFor a link having the DSA user port type, the following additional arguments are  sup‐\nported:\n\nip link set type dsa [ conduit DEVICE ]\n\n\nconduit  DEVICE  - change the DSA conduit (host network interface) responsible\nfor handling the locally terminated traffic for  the  given  DSA  switch  user\nport.  For  a description of which network interfaces are suitable for serving\nas  conduit  interfaces  of  this  user  port,  please  see   https://www.ker‐\nnel.org/doc/html/latest/networking/dsa/configuration.html#affinity-of-user-\nports-to-cpu-ports as well as what is supported by the driver in use.\n\n\nmaster DEVICE - this is a synonym for \"conduit\".\n\n\n"
                },
                {
                    "name": "ip link show - display device attributes",
                    "content": "dev NAME (default)\nNAME specifies the network device to show.\n\n\ngroup GROUP\nGROUP specifies what group of devices to show.\n\n\nup     only display running interfaces.\n\n\nmaster DEVICE\nDEVICE specifies the master device which enslaves devices to show.\n\n\nvrf NAME\nNAME specifies the VRF which enslaves devices to show.\n\n\ntype TYPE\nTYPE specifies the type of devices to show.\n\nNote  that  the type name is not checked against the list of supported types - instead\nit is sent as-is to the kernel. Later it is used to filter the returned interface list\nby comparing it with the relevant attribute in case the kernel didn't filter  already.\nTherefore any string is accepted, but may lead to empty output.\n\n"
                },
                {
                    "name": "nomaster",
                    "content": "only show devices with no master\n\n"
                },
                {
                    "name": "ip link xstats - display extended statistics",
                    "content": "type TYPE\nTYPE specifies the type of devices to display extended statistics for.\n\n"
                },
                {
                    "name": "ip link afstats - display address-family specific statistics",
                    "content": "dev DEVICE\nDEVICE specifies the device to display address-family statistics for.\n\n"
                },
                {
                    "name": "ip link help - display help",
                    "content": "TYPE specifies which help of link type to display.\n\n\nGROUP\nmay be a number or a string from the file /etc/iproute2/group which can be manually filled.\n\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "ip link show\nShows the state of all network interfaces on the system.\n\nip link show type bridge\nShows the bridge devices.\n\nip link show type vlan\nShows the vlan devices.\n\nip link show master br0\nShows devices enslaved by br0\n\nip link set dev ppp0 mtu 1400\nChange the MTU the ppp0 device.\n\nip link add link eth0 name eth0.10 type vlan id 10\nCreates a new vlan device eth0.10 on device eth0.\n\nip link delete dev eth0.10\nRemoves vlan device.\n\nip link help gre\nDisplay help for the gre link type.\n\nip link add name tun1 type ipip remote 192.168.1.1 local 192.168.1.2 ttl 225 encap gue encap-\nsport auto encap-dport 5555 encap-csum encap-remcsum\nCreates  an  IPIP  that is encapsulated with Generic UDP Encapsulation, and the outer UDP\nchecksum and remote checksum offload are enabled.\n\nip link set dev eth0 xdp obj prog.o\nAttaches a XDP/BPF program to device eth0, where the program is located in  prog.o,  sec‐\ntion  \"prog\"  (default  section). In case a XDP/BPF program is already attached, throw an\nerror.\n\nip -force link set dev eth0 xdp obj prog.o sec foo\nAttaches a XDP/BPF program to device eth0, where the program is located in  prog.o,  sec‐\ntion  \"foo\".  In case a XDP/BPF program is already attached, it will be overridden by the\nnew one.\n\nip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo\nAttaches a XDP/BPF program to device eth0, where the program was previously pinned as  an\nobject node into BPF file system under name foo.\n\nip link set dev eth0 xdp off\nIf  a  XDP/BPF program is attached on device eth0, detach it and effectively turn off XDP\nfor device eth0.\n\nip link add link wpan0 lowpan0 type lowpan\nCreates a 6LoWPAN interface named lowpan0 on the underlying IEEE 802.15.4 device wpan0.\n\nip link add dev ip6erspan11 type ip6erspan seq key 102 local fc00:100::2  remote  fc00:100::1\nerspanver 2 erspandir ingress erspanhwid 17\nCreates a IP6ERSPAN version 2 interface named ip6erspan00.\n\nip link set dev swp0 type dsa conduit eth1\nChanges the conduit interface of the swp0 user port to eth1.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ip(8), ip-netns(8), ethtool(8), iptables(8)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Original Manpage by Michail Litvak <mci@owl.openwall.com>\n\niproute2                                     13 Dec 2012                                  IP-LINK(8)",
            "subsections": []
        }
    },
    "summary": "ip-link - network device configuration",
    "flags": [],
    "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  remote  fc00:100::1",
        "erspanver 2 erspandir ingress erspanhwid 17",
        "Creates a IP6ERSPAN version 2 interface named ip6erspan00.",
        "ip link set dev swp0 type dsa conduit eth1",
        "Changes the conduit interface of the swp0 user port to eth1."
    ],
    "see_also": [
        {
            "name": "ip",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ip/8/json"
        },
        {
            "name": "ip-netns",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ip-netns/8/json"
        },
        {
            "name": "ethtool",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ethtool/8/json"
        },
        {
            "name": "iptables",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/iptables/8/json"
        }
    ]
}