Master Linux Network Management with the Powerful ip Command
This guide explains how to install iproute2, use the ip command to configure IP addresses, manage routing tables, monitor network statistics, handle ARP entries, and troubleshoot Linux networking, providing clear examples and command-line snippets for system administrators.
The ip command in Linux replaces the older ifconfig tool, offering more powerful network management capabilities as part of the iproute2 suite, which is pre‑installed on most distributions.
To install iproute2 manually, download the package or clone the source:
git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/shemminger/iproute2.gitSetting and Deleting IP Addresses
Assign an address to an interface: sudo ip addr add 192.168.0.193/24 dev wlan0 Verify the assignment: ip addr show wlan0 Remove the address by replacing add with del:
sudo ip addr del 192.168.0.193/24 dev wlan0Listing Routing Table Entries
Display the current routing table: ip route show Query the route a specific destination would take:
ip route get 10.42.0.47Changing the Default Route
Add a new default gateway:
sudo ip route add default via 192.168.0.196Displaying Network Statistics
Show statistics for a particular interface (e.g., p2p1) with detailed counters:
ip -s -s link ls p2p1ARP Entries
List ARP (neighbour) entries to see MAC addresses associated with IPs on the local network:
ip neighbourMonitoring Netlink Messages
Watch real‑time netlink events for all interfaces:
ip monitor allActivating and Deactivating Interfaces
Bring an interface up or down, similar to ifconfig:
sudo ip link set ppp0 down sudo ip link set ppp0 upGetting Help
Use the help option for command‑specific assistance, e.g.:
ip route helpConclusion
The ip command is an essential tool for Linux administrators and script writers, offering a modern replacement for ifconfig with extensive functionality for configuring and troubleshooting network interfaces.
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.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
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.
