Change device attributes. Link is a network device and the corresponding commands display and change the state of devices. link can be abbreviated to l
Syntax ip link set DEVICE { 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 | alias NAME | vf NUM [ mac LLADDR ] [ vlan VLANID [ qos VLAN-QOS ] ] [ rate TXRATE ] } Key dev NAME (default) NAME specifies network device to operate on. When configuring SR-IOV Virtual Fuction (VF) devices, this keyword should specify the associated Physical Function (PF) device. 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. alias NAME give the device a symbolic name for easy reference. 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. The vf parameter must be specified. 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 are listed. up only display running interfaces.
Examples:
Change the state of the network interface device(s) to UP:
$
ip link set up
Change the state of the network interface device(s) to DOWN:
$
ip link set down
Change the Maximum Transmission units (MTU) size for better performance with a Gigabit NIC/Switch:
$ ip link set mtu 9000 dev eth0
$ ip link set eth0 up
“It is remarkable how easily and insensibly we fall into a particular route, and make a beaten track for ourselves” ~ Henry David Thoreau
Related linux commands:
ip - Routing, devices and tunnels.
Equivalent Windows command: ROUTE - Manipulate network routing tables.