from small one page howto to huge articles all in one place
 

search text in:





Poll
Which filesystem do you use?






poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

102562

userrating:

average rating: 1.7 (85 votes) (1=very good 6=terrible)


May 25th. 2007:
Words

486

Views

217278

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

98005

userrating:

average rating: 1.3 (28 votes) (1=very good 6=terrible)


April, 26th. 2006:

Druckversion
You are here: manpages





IP\-LINK

Section: Linux (8)
Updated: 13 Dec 2012
Index Return to Main Contents
 

NAME

ip-link - network device configuration  

SYNOPSIS


ip [ OPTIONS ] link { COMMAND | help }


OPTIONS := { -V[ersion] | -h[uman-readable] | -s[tatistics] | -r[esolve] | -f[amily] { inet | inet6 | ipx | dnet | link } | -o[neline] }


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 ]


TYPE := [ bridge | bond | can | dummy | hsr | ifb | ipoib | macvlan | macvtap | vcan | veth | vlan | vxlan | ip6tnl | ipip | sit | gre | gretap | ip6gre | ip6gretap ]


ip link delete DEVICE type TYPE [ ARGS ]


ip link set { DEVICE | group GROUP } { up | down | arp { on | off } |
promisc { on | off } |
allmulticast { on | off } |
dynamic { on | off } |
multicast { on | off } |
txqueuelen PACKETS |
name NEWNAME |
address LLADDR | broadcast LLADDR |
mtu MTU |
netns PID |
netns NETNSNAME |
alias NAME |
vf NUM [ mac LLADDR ] [ vlan VLANID [ qos VLAN-QOS ] ] [ rate TXRATE ] [ max_tx_rate TXRATE ] [ min_tx_rate TXRATE ] [ spoofchk { on | off } ] [ state { auto | enable | disable} ] |
master DEVICE
nomaster }


ip link show [ DEVICE | group GROUP | up | master DEVICE | type TYPE ]


ip link help [ TYPE ]

 

DESCRIPTION

 

ip link add - add virtual link

link DEVICE
specifies the physical device to act operate on.

NAME specifies the name of the new virtual device.

TYPE specifies the type of the new device.

Link types:

bridge - Ethernet Bridge device

bond - Bonding device

dummy - Dummy network interface

hsr - High-availability Seamless Redundancy device

ifb - Intermediate Functional Block device

ipoib - IP over Infiniband device

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

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

vcan - Virtual Controller Area Network interface

veth - Virtual ethernet interface

vlan - 802.1q tagged virtual LAN interface

vxlan - Virtual eXtended LAN

ip6tnl - Virtual tunnel interface IPv4|IPv6 over IPv6

ipip - Virtual tunnel interface IPv4 over IPv4

sit - Virtual tunnel interface IPv6 over IPv4

gre - Virtual tunnel interface GRE over IPv4

gretap - Virtual L2 tunnel interface GRE over IPv4

ip6gre - Virtual tunnel interface GRE over IPv6

ip6gretap - Virtual L2 tunnel interface GRE over IPv6

numtxqueues QUEUE_COUNT
specifies the number of transmit queues for new device.

numrxqueues QUEUE_COUNT
specifies the number of receive queues for new device.

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

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

ip link add DEVICE type vxlan id ID dev PHYS_DEV ] [ { group | remote } IPADDR local IPADDR ttl TTL tos TOS port MIN MAX [no]learning [no]proxy [no]rsc [no]l2miss [no]l3miss ageing SECONDS maxaddress NUMBER

id VNI - specifies the VXLAN Network Identifer (or VXLAN Segment Identifier) to use.

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

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

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

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

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

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

port MIN MAX - specifies the range of port numbers to use as UDP source ports to communicate to the remote VXLAN tunnel endpoint.

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

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

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

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

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

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

maxaddress NUMBER - specifies the maximum number of FDB entries.

GRE, IPIP, SIT Type Support
For a link of types GRE/IPIP/SIT the following additional arguments are supported:

ip link add DEVICE type { gre | ipip | sit } remote ADDR local ADDR encap { fou | gue | none } encap-sport { PORT | auto } encap-dport PORT [no]encap-csum [no]encap-remcsum

remote ADDR - specifies the remote address of the tunnel.

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

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

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

[no]encap-csum - specifies if UDP checksums are enabled in the secondary encapsulation.

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

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

ip link add DEVICE type { ip6gre | ip6gretap } remote ADDR local ADDR [i|o]seq] [i|o]key KEY [i|o]csum hoplimit TTL encaplimit ELIM tclass TCLASS flowlabel FLOWLABEL dscp inherit dev PHYS_DEV

remote ADDR - specifies the remote IPv6 address of the tunnel.

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

[i|o]seq - serialize packets. The oseq flag enables sequencing of outgoing packets. The iseq flag requires that all input packets are serialized.

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

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

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

encaplimit ELIM - specifies a fixed encapsulation limit. Default is 4.

flowlabel FLOWLABEL - specifies a fixed flowlabel.

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

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

ip link add DEVICE name NAME type ipoib [ pkey PKEY ] [mode MODE ]

pkey PKEY - specifies the IB P-Key to use.

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

 

ip link delete - delete virtual link

DEVICE specifies the virtual device to act operate on. TYPE specifies the type of the device.

dev DEVICE
specifies the physical device to act operate on.

 

ip link set - change device attributes

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

group GROUP
GROUP has a dual role: If both group and dev are present, then move the device to the specified group. If only a group is specified, then the command operates on all 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.

dynamic on or dynamic off
change the DYNAMIC flag on the device.

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

txqueuelen NUMBER
txqlen NUMBER
change the transmit queue length of the device.

mtu NUMBER
change the MTU of the device.

address LLADDRESS
change the station address of the interface.

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

netns PID
move the device to the network namespace associated with the process PID.

netns NETNSNAME
move the device to the network namespace associated with name NETNSNAME.

alias NAME
give the device a symbolic name for easy reference.

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

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

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

vlan VLANID - change the assigned VLAN for the specified VF. When specified, all traffic sent from the VF will be tagged with the specified VLAN ID. 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.

qos VLAN-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.

rate TXRATE -- 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.

max_tx_rate TXRATE - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF. vf parameter must be specified.

min_tx_rate TXRATE - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF. Minimum TXRATE should be always <= Maximum TXRATE. vf parameter must be specified.

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

state auto|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.

master DEVICE
set master device of the device (enslave device).

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

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.

 

ip link show - display device attributes

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

group GROUP
GROUP specifies what group of devices to show.

up
only display running interfaces.

master DEVICE
DEVICE specifies the master device which enslaves devices to show.

type TYPE
TYPE specifies the type of devices to show.

The show command has additional formatting options:

-s, -stats, -statistics
output more statistics about packet usage.

-d, -details
output more detailed information.

-h, -human, -human-readble
output statistics with human readable values number followed by suffix

-iec
print human readable rates in IEC units (ie. 1K = 1024).

 

ip link help - display help

TYPE specifies which help of link type to dislpay.

 

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.

 

SEE ALSO


ip(8)

 

AUTHOR

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


 

Index

NAME
SYNOPSIS
DESCRIPTION
ip link add - add virtual link
ip link delete - delete virtual link
ip link set - change device attributes
ip link show - display device attributes
ip link help - display help
EXAMPLES
SEE ALSO
AUTHOR


Please read "Why adblockers are bad".



Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2017 Sascha Nitsch Unternehmensberatung UG(haftungsbeschränkt)
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 21.3 ms