rss logo

iproute2: Essential Linux Networking Commands

iproute2 is a modern suite of tools used to control and monitor networking capabilities in the Linux kernel. It replaces older utilities like ifconfig and offers advanced functionality for managing network interfaces, addresses, routing, and more.

Common iproute2 Commands

IP Address Management

root@host:~# ip addr add 192.168.2.41/24 dev eth0
root@host:~# ip addr add 192.168.2.42/24 dev eth0
root@host:~# ip route del default
root@host:~# ip route add default via 192.168.2.1
root@host:~# ip route add 192.168.1.210 dev ppp0

Interface Management (Link)

root@host:~# ip link set ens33 up
root@host:~# ip link set ens33 down

VLAN Configuration

root@host:~# ip link add link eth0 name IPv6 type vlan id 10
root@host:~# ip link set IPv6 up
root@host:~# ip link set IPv6 down
root@host:~# ip link delete IPv6