Mastering iproute2: A Practical Guide to Linux Network Configuration
Learn how to use the iproute2 suite on Linux to view, configure, and troubleshoot network interfaces, addresses, routes, and ARP entries, replacing legacy net‑tools commands with consistent, powerful commands like ip addr, ip link, and ip route, demonstrated on Ubuntu 12.04.
Introduction
This article explains how to use the iproute2 package for managing Linux network interfaces, addresses, routes, and ARP information. It replaces the older net-tools utilities (e.g., ifconfig) with a unified set of commands.
Viewing Interfaces, Addresses, and Routes
Basic commands to list interfaces: ip link To show detailed address information for all interfaces: ip addr To view a specific interface: ip link show eth0 To display the routing table:
ip route showConfiguring Interfaces and Addresses
Enable or disable an interface:
ip link set eth1 up</code>
<code>ip link set eth1 downWarning: Do not accidentally disable the network interface you are connected through.
Set interface properties such as multicast flag, MTU, and queue length:
ip link set eth1 multicast on</code>
<code>ip link set eth1 multicast off</code>
<code>ip link set eth1 mtu 1500</code>
<code>ip link set eth1 txqueuelen 1000Rename an interface or change its ARP flag:
ip link set eth1 name eth10</code>
<code>ip link set eth1 arp onAdd or delete an IP address on an interface:
ip addr add 192.168.1.10/24 dev eth0</code>
<code>ip addr del 192.168.1.10/24 dev eth0Other iproute2 Features
Routing rules can be inspected with: ip rule show Typical output shows the default kernel rules (local, main, default). Managing rules requires careful use of ip rule add, ip rule del, etc., and should only be done by experienced users.
ARP information is handled with the ip neigh command: ip neigh This lists neighbor entries such as the default gateway and resolves IP addresses to MAC addresses.
Conclusion
After reading this guide you should be comfortable using iproute2 commands for network inspection and configuration. While many older tutorials still reference net-tools, the iproute2 suite offers a more consistent and future‑proof interface for Linux networking tasks.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Efficient Ops
This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
