ip-link man page

ip-link — network device configuration

Synopsis

ip link { COMMAND | help }

ip link add [ link DEVICE ] [ name ] NAME
[ txqueuelen PACKETS ]
[ address LLADDR ] [ broadcast LLADDR ]
[ mtu MTU ] [ index IDX ]
[ numtxqueues QUEUE_COUNT ] [ numrxqueues QUEUE_COUNT ]
type TYPE [ ARGS ]

ip link delete { DEVICE | group Group } type TYPE [ ARGS ]

ip link set { DEVICE | group Group }
[ { up | down } ]
[ type ETYPE TYPE_ARGS ]
[ arp { on | off } ]
[ dynamic { on | off } ]
[ multicast { on | off } ]
[ allmulticast { on | off } ]
[ promisc { on | off } ]
[ protodown { on | off } ]
[ trailers { on | off } ]
[ txqueuelen PACKETS ]
[ name NEWNAME ]
[ address LLADDR ]
[ broadcast LLADDR ]
[ mtu MTU ]
[ netns { PID | NETNSNAME } ]
[ link-netnsid ID ]
[ alias NAME ]
[ vf NUM [ mac LLADDR ]
[ VFVLAN-LIST ]
[ rate TXRATE ]
[ max_tx_rate TXRATE ]
[ min_tx_rate TXRATE ]
[ spoofchk { on | off } ]
[ query_rss { on | off } ]
[ state { auto | enable | disable } ]
[ trust { on | off } ]
[ node_guid eui64 ]
[ port_guid eui64 ] ]
[ xdp { off |
object FILE [ section NAME ] [ verbose ] |
pinned FILE } ]
[ master DEVICE ]
[ nomaster ]
[ vrf NAME ]
[ addrgenmode { eui64 | none | stable_secret | random } ]
[ macaddr { flush | { add | del } MACADDR | set [ MACADDR [ MACADDR [ ... ] ] ] } ]

ip link show [ DEVICE | group Group ] [ up ] [ master DEVICE ] [ type ETYPE ] [ vrf NAME ]

ip link xstats type TYPE [ ARGS ]

ip link afstats [ dev DEVICE ]

ip link help [ TYPE ]

TYPE := [ bridge | bond | can | dummy | hsr | ifb | ipoib | macvlan | macvtap | vcan | veth | vlan | vxlan | ip6tnl | ipip | sit | gre | gretap | ip6gre | ip6gretap | vti | nlmon | ipvlan | lowpan | geneve | vrf | macsec ]

ETYPE := [ TYPE | bridge_slave | bond_slave ]

VFVLAN-LIST := [ VFVLAN-LIST ] VFVLAN

VFVLAN := [ vlan VLANID [ qos VLAN-QOS ] [ proto VLAN-PROTO ] ]

Description

Group

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

Examples

ip link show

Shows the state of all network interfaces on the system.

ip link show type bridge

Shows the bridge devices.

ip link show type vlan

Shows the vlan devices.

ip link show master br0

Shows devices enslaved by br0

ip link set dev ppp0 mtu 1400

Change the MTU the ppp0 device.

ip link add link eth0 name eth0.10 type vlan id 10

Creates a new vlan device eth0.10 on device eth0.

ip link delete dev eth0.10

Removes vlan device.

ip link help gre

Display help for the gre link type.

ip link add name tun1 type ipip remote 192.168.1.1 local 192.168.1.2 ttl 225 encap gue encap-sport auto encap-dport 5555 encap-csum encap-remcsum

Creates an IPIP that is encapsulated with Generic UDP Encapsulation, and the outer UDP checksum and remote checksum offload are enabled.

ip link set dev eth0 xdp obj prog.o

Attaches a XDP/BPF program to device eth0, where the program is located in prog.o, section "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, section "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.

See Also

ip(8), ip-netns(8), ethtool(8), iptables(8)

Author

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

Referenced By

ip(8), ip-macsec(8).

13 Dec 2012 iproute2 Linux