idVLANID - specifies the VLAN Identifer to use. Note
that numbers with a leading " 0 " or " 0x
" are interpreted as octal or hexadeimal,
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 support 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.

devPHYS_DEV - specifies the physical device to use for
tunnel endpoint communication.

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

remoteIPADDR - specifies the unicast destination IP address
to use in outgoing 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.

localIPADDR - specifies the source IP address to use in
outgoing packets.

ttlTTL - specifies the TTL value to use in outgoing
packets.

tosTOS - specifies the TOS value to use in outgoing
packets.

flowlabelFLOWLABEL - specifies the flow label to use in
outgoing packets.

ageingSECONDS - specifies the lifetime in seconds of FDB
entries learnt by the kernel.

maxaddressNUMBER - specifies the maximum number of FDB
entries.

[no]external
- specifies whether an external control plane (e.g. ip
route encap) 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.

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
encapsulation.

[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 default is
"ipip". IPv6-Over-IPv4 is not supported for
IPIP.

[i|o]keyKEY | 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 .

ttlTTL - specifies the TTL value to use in outgoing
packets.

tosTOS - specifies the TOS value to use in outgoing
packets.

[no]pmtudisc
- enables/disables Path MTU Discovery on this tunnel. It is
enabled by default. Note that a fixed ttl is incompatible
with this option: tunneling 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 Required) message.
Enabling this attribute causes the DF flag to be
ignored.

devPHYS_DEV - specifies the physical device to use for
tunnel endpoint communication.

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
encapsulation.

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

[i|o]keyKEY | 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.

hoplimitTTL - specifies Hop Limit value to use in outgoing
packets.

encaplimitELIM - specifies a fixed encapsulation limit. Default
is 4.

flowlabelFLOWLABEL - specifies a fixed flowlabel.

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

tclassTCLASS - 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
default). 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
addDEVICEnameNAMEtype
ipoib [ pkeyPKEY ] [ modeMODE ]

pkeyPKEY - specifies the IB P-Key to use.

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

ERSPAN Type Support

For a link of type
ERSPAN/IP6ERSPAN the following additional arguments
are supported:

erspan_hwidhwid - an unique identifier of an ERSPAN v2 engine
within a system. 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 default). 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:

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 instance 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 communication. 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, allowing 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 nopromisc flag prevents this, so the
promisc flag may be controlled using standard tools.

mode
source - 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 standard
port or tag based. The feature is useful to deploy 802.1x
mac based behavior, where drivers of underlying interfaces
doesn’t allows that.

High-availability Seamless
Redundancy (HSR) Support

For a link of type HSR
the following additional arguments are supported:

ageing_timeAGEING_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_maskMASK - 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_addressADDRESS - 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_delayFORWARD_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_timeHELLO_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_ageMAX_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
between 6 and 40.

mcast_routerMULTICAST_ROUTER - set bridge’s multicast
router if IGMP snooping is enabled. MULTICAST_ROUTER
is an integer value having the following meaning:

0 -
disabled.

1 -
automatic (queried).

2 -
permanently enabled.

mcast_query_use_ifaddrMCAST_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_intervalQUERIER_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_maxHASH_MAX - set maximum size of multicast hash table
(defaults to 512, value must be a power of 2).

mcast_last_member_countLAST_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_intervalLAST_MEMBER_INTERVAL - interval between queries to
find remaining members of a group, after a "leave"
message is received.

mcast_startup_query_countSTARTUP_QUERY_COUNT - set the number of IGMP queries
to send during startup phase (defaults to 2).

mcast_startup_query_intervalSTARTUP_QUERY_INTERVAL - interval between queries in
the startup phase.

mcast_query_intervalQUERY_INTERVAL - interval between queries sent by the
bridge after the end of the startup phase.

mcast_query_response_intervalQUERY_RESPONSE_INTERVAL - set the Max Response
Time/Maximum Response Delay for IGMP/MLD queries sent by the
bridge.

mcast_membership_intervalMEMBERSHIP_INTERVAL - delay after which the bridge
will leave a group, if no membership reports for this group
are received.

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

portPORT - 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.

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

cipherCIPHER_SUITE - defines the cipher suite to use.

icvlenLENGTH - sets the length of the Integrity Check Value
(ICV).

encrypt
on or encrypt off - switches between
authenticated encryption, or authenticity 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.

windowSIZE - sets the size of the replay window.

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

encodingsaAN - sets the active secure association for
transmission.

VRF Type Support

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

ip link
addDEVICEtype vrf tableTABLE

table
table id associated with VRF device

RMNET Type Support

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

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

typeTYPE

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.
devDEVICE

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 devices 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.

protodown on or
protodown off

change the PROTODOWN
state on the device. Indicates that a protocol error has
been detected on the port. Switch drivers can react to this
error by doing a phys down on the switch port.

dynamic on or dynamic
off

change the DYNAMIC flag
on the device. Indicates that address can change when
interface goes down (currently NOT used by the
Linux).

nameNAME

change the name of the device.
This operation is not recommended if the device is running
or has some addresses already configured.

txqueuelenNUMBER
txqlenNUMBER

change the transmit queue
length of the device.

mtuNUMBER

change the MTU of the
device.

addressLLADDRESS

change the station address of
the interface.

broadcastLLADDRESS
brdLLADDRESS
peerLLADDRESS

change the link layer broadcast
address or the peer address when the interface is
POINTOPOINT.

netnsNETNSNAME |
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, ppp, 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
-kDEVICE

To change
network namespace for wireless devices the iw tool
can be used. But it allows to change network namespace only
for physical devices and by process PID.

aliasNAME

give the device a symbolic name
for easy reference.

groupGROUP

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

vfNUM

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

macLLADDRESS - change the station address for the
specified VF. The vf parameter must be specified.

vlanVLANID - change the assigned VLAN for the specified
VF. When specified, all traffic sent from the VF will be
tagged with the specified VLAN ID. Incoming 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 disables VLAN tagging and filtering. The
vf parameter must be specified.

qosVLAN-QOS - assign VLAN QOS (priority) bits for the
VLAN tag. When specified, 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 disables VLAN
tagging and filtering for the VF.

protoVLAN-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 outgoing/incoming traffic,
respectively. If not specified, the value is assumed to be
802.1Q. Both the vf and vlan parameters must
be specified.

rateTXRATE -- change the allowed transmit bandwidth, in
Mbps, for the specified VF. Setting this parameter to 0
disables rate limiting. vf parameter must be
specified. Please use new API max_tx_rate option
instead.

spoofchkon|off - turn packet spoof checking on or off for the
specified VF.

query_rsson|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.

stateauto|enable|disable - set the virtual link state as
seen by the specified 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.

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
indicate 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
requestsing 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
hardware offloads. xdpoffload in ip link output
indicates that the program has been offloaded to hardware
and can also be used to request the "offload"
mode, much like xdpgeneric 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 device.

objectFILE - 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
specifications, 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 attached 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 section for usage
examples.

sectionNAME - Specifies a section name that contains the BPF
program code. If no section 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.

pinnedFILE - 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 already.

masterDEVICE

set master device of the device
(enslave device).

nomaster

unset master device of the
device (release device).

addrgenmodeeui64|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

typeETYPE
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 manipulate settings to slave
devices:

Bridge Slave Support

For a link with master
bridge the following additional arguments are
supported:

mcast_routerMULTICAST_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 of
routers (this is the default), 2 to permanently
enable multicast traffic forwarding on this port or 3
to enable multicast routers temporarily on this port, not
depending on incoming 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 be flooded with multicast traffic for which there is no
MDB entry.

group_fwd_maskMASK - 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_portDEVICE - 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_idID ]

queue_idID - 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 } [ macaddrCOMMAND
MACADDR... ]

Commands:

add - add MACADDR to
allowed list

set -
replace allowed list

del -
remove MACADDR from allowed list

flush -
flush whole allowed list

ip link show
- display device attributes
devNAME(default)

NAME specifies the
network device to show. If this argument is omitted all
devices in the default group are listed.

groupGROUP

GROUP specifies what
group of devices to show.

up

only display running interfaces.

masterDEVICE

DEVICE specifies the
master device which enslaves devices to show.

vrfNAME

NAME speficies the VRF
which enslaves devices to show.

typeTYPE

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.