How the ip Command Replaces ifconfig in Linux

For decades, ifconfig was the standard tool for network interface management in Linux, but it has now been deprecated in favor of the modern ip command from the iproute2 suite. This article explains why modern distributions phased out ifconfig, the architectural advantages of the ip command, and how to translate legacy network tasks—such as viewing interfaces, managing IP addresses, controlling links, and handling routing tables—into the modern ip syntax.

Why ifconfig Was Deprecated

The ifconfig utility belongs to the legacy net-tools package, which has not seen active development for many years. It relies on the older ioctl system call interface to communicate with the Linux kernel network stack. This legacy approach has distinct limitations:

The Architecture of the ip Command

The ip command interacts with the Linux kernel using Netlink sockets, allowing for bidirectional, asynchronous, and event-driven communication. This architecture allows administrators to query and modify almost any aspect of the networking subsystem through a unified, object-oriented syntax:

ip [OPTIONS] OBJECT COMMAND

Common objects include:

Key Command Comparisons

1. Displaying Network Interfaces and Addresses

To inspect layer 2 (link state, MAC addresses) without layer 3 IP details:

2. Bringing Interfaces Up or Down

3. Assigning and Removing IP Addresses

Under ifconfig, adding a second IP address required creating an alias. The ip tool assigns addresses directly to the device:

4. Managing Routes

Previously, routing required a separate command (route). The iproute2 package consolidates routing directly into the ip utility:

5. Managing the ARP / Neighbor Table

Handling address resolution mappings also previously required a standalone tool (arp):

Conclusion

The transition from ifconfig to ip replaces fragmented, outdated utilities with a single, high-performance tool designed for modern networking stacks. While legacy scripts may still rely on ifconfig, mastering the ip command is essential for working with current Linux environments, containerization, and advanced routing topologies.