iproute2 vs net-tools

iproute2 package contains utilities for controlling and monitoring networking, IP address, and routing. It is a modern replacement for net-tools.

Iproute2 is an open-source project mainly focussed on network components of the Linux kernel. The commonly used utilities inside iproute2 are ip, ss, and bridge.

The below table shows the iproute2 and deprecated net-tools Linux commands.

iproute2net-toolsNote
ip link showifconfig -aDisplay all interfaces
ip link set down/up eth0ifconfig eth0 up/downEnable (UP)/Disable (DOWN) Network Interface
ip addr add 192.168.0.10/24 dev eth0ifconfig eth0 192.168.0.10/24Assign an IPv4 address to Network Interface
ip addr del 192.168.0.10/24 dev eth0ifconfig eth0 0Delete an IPv4 address from Network Interface
ip addr show dev eth0ifconfig eth0Display IPv4 address of a Network Interface
ip -6 addr add fe80::f0b7:57ff:fe2f:5f0d/64 dev eth1ifconfig eth1 inet6 add fe80::f0b7:57ff:fe2f:5f0d/64Assign an IPv6 address to a Network Interface
ip -6 addr show dev eth0ifconfig eth0Display IPv6 address of a Network Interface
ip link set dev eth0 address 02:42:20:d2:28:36ifconfig eth0 hw ether 02:42:20:d2:28:36Change the MAC Address of a Network Interface
ip route showroute -nShow IP Routing Table
ip route add default via 192.168.0.1 dev eth0route add default gw 192.168.0.1 eth0Add a Default Route
ip route replace default via 192.168.0.1 dev enp0s3route del default gw 192.168.0.1 enp0s3Delete a Default Route
ip route add 10.24.32.0/24 via 192.168.0.1 dev enp0s3route add -net 10.24.32.0/24 gw 192.168.0.1 dev enp0s3Add a Static Route
ip route del 192.168.10.0/24route del -net 192.168.10.0/24Delete a Static Route
ssnetstatDisplay socket - listening tcp/udp
arp -an ip neighDisplay ARP Table
bridgebrctlManage bridge addresses and devices
iproute2 cheat sheet
iproute2 cheat sheet

Many Linux users still prefer to use legacy tools such as netstat, ifconfig, route etc. Iproute2 package tools are pretty faster and retrieve more information for example ss command is faster than netstat.

Thanks for reading, provide your feedback and suggestions in the comment section.

Leave a Comment