Master Linux ‘ip’ Command: Essential Network Management Operations
This guide explains the Linux ip command—its syntax, how to view and control network interfaces, configure IP addresses, manage routes, set up VLANs, and handle ARP entries—providing practical examples that enable efficient network administration and troubleshooting on Linux systems.
Overview
The ip utility, part of the iproute2 suite, replaces the older ifconfig tool and offers fine‑grained control over network interfaces, addresses, routes, ARP tables, and VLANs in Linux.
Basic Syntax
The general form is:
ip [OPTIONS] OBJECT COMMAND OBJECTcan be link, addr, route, etc., and COMMAND specifies the action such as add, del, show, or set.
Viewing Interface Information
Show all interfaces: ip link show Show a specific interface (e.g., eth0):
ip link show dev eth0Enabling and Disabling Interfaces
ip link set dev eth0 up ip link set dev eth0 downConfiguring IP Addresses
ip addr add 192.168.1.10/24 dev eth0 ip addr del 192.168.1.10/24 dev eth0Display all addresses: ip addr show Display addresses for a specific device:
ip addr show dev eth0Managing Routes
ip route show ip route add 192.168.1.0/24 via 192.168.1.1 ip route del 192.168.1.0/24 ip route add default via 192.168.1.1Network Interface Aliases
ip addr add 192.168.1.20/24 dev eth0 label eth0:1 ip addr show dev eth0ARP Cache Management
ip neigh show ip neigh add 192.168.1.10 lladdr 00:11:22:33:44:55 dev eth0 ip neigh del 192.168.1.10 dev eth0VLAN Configuration
ip link add link eth0 name eth0.100 type vlan id 100 ip link delete eth0.100Conclusion
The ip command is a powerful, flexible tool for Linux network management, covering everything from basic interface queries to advanced routing and VLAN handling; mastering these operations greatly simplifies daily administration and troubleshooting 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.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
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.
