Operations 6 min read

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.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux Network Management with the Powerful ip Command

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.git

Setting 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 wlan0

Listing 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.47

Changing the Default Route

Add a new default gateway:

sudo ip route add default via 192.168.0.196

Displaying Network Statistics

Show statistics for a particular interface (e.g., p2p1) with detailed counters:

ip -s -s link ls p2p1

ARP Entries

List ARP (neighbour) entries to see MAC addresses associated with IPs on the local network:

ip neighbour

Monitoring Netlink Messages

Watch real‑time netlink events for all interfaces:

ip monitor all

Activating and Deactivating Interfaces

Bring an interface up or down, similar to ifconfig:

sudo ip link set ppp0 down
sudo ip link set ppp0 up

Getting Help

Use the help option for command‑specific assistance, e.g.:

ip route help

Conclusion

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.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxTroubleshootingnetwork administrationiproute2ip command
MaGe Linux Operations
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.