Linux Networking with iproute2: Configuring Interfaces and Routes
The ip command replaced ifconfig and route years ago. Here is how I configure interfaces, addresses, routes, and neighbors on modern Linux. The ip command from the iproute2 package replaced the old ifconfig , route , and arp commands years ago, but many tutorials still teach the legacy tools. On any modern Linux system, ip is the right tool for configuring interfaces, routes, and addresses. After configuring networking on hundreds of servers, these are the commands and patterns I use. Viewing Interface and Address State The ip addr command shows every interface with its addresses, link state, and MAC. The shorter ip a is what I type in practice. To see only link-layer state without addresses, ip link is cleaner. ip a # all interfaces and addresses ip addr show eth0 # one interface ip -br a # brief output, one line per interface ip link # link state only The -br flag gives a brief, one-line-per-interface view that I use for quick checks. It shows the interface name, state, and address without the verbose multicast and statistics sections. Adding and Removing Addresses ip addr add 192.168.1.10/24 dev eth0 ip addr del…