Open In App

How To Use IPRoute2 Tools to Manage Network Configuration on a Linux

Last Updated : 10 Oct, 2023
Like Article

In computer networking, the iproute2 command line utility tool is a versatile and powerful tool for users. it provides beginner-friendly functionality to manage and configure the network. In this article, we are going to discuss each and every part of the iproute2 tool and how to implement it in our system. By the end of this article, you’ll have solid knowledge about the iproute2 tool to fine-tune your network settings.


In Linux distribution, iproute2 is a collection of command line utilities for controlling and monitoring the network configuration. It is the most powerful tool for system administrators, network engineers, and Linux users. It is a more flexible tool than ifconfig, route, and netstat commands. It can be used as multiple configurations of interfaces at the same time.

There are some common utilities of iproute2:

  • ip: It is used to configure and manage IP and routing tables.
  • tc: It is used to configure and manage traffic control rules.
  • bridge: It is used to manage bridge devices.
  • arpd: It is used to manage the ARP cache.
  • ss: It gives the information about TCP & UDP sockets and other network information.

Manage Network configuration on a Linux

Step 1: To show/view the details of all interface

The ip addr or IP address command is used to check IPv4 & IPv6 addresses, additionally it will also show the information of ether(MAC) address, loopback address(lo), interface UP/DOWN state, MTU (Maximum Transfer Unit)..

ip addr


To view the details of particular interface:

ip addr show eth0


To view the IPv4 or IPv6 address for the particular interface:

ip -4 addr show eth0


ip -6 addr show eth0


Step 2: Add/Delete the ip address to a particular interface

For adding or the deleting the ip address, we can use ip addr command along with option “add” or “delete” and “dev” for specifying the interface name.

ip addr dev eth0


Step 3: To view the network interface details

To know the details of network interface, we can use the command “ip link”. link will display the network devices.

ip link show


To view the particular network interface:

ip link show lo


Step 4: Set the network interface up and down

To set the loopback(lo) interface down:

ip link set lo down



To set the loopback(lo) interface up

ip link set lo up



Step 5: To view and manage the routing table

ip route 


Add/Delete the static route to the routing table

To add the static route, we can use add option with ip route command and specify destination address, default gateway, and interface name.

ip route add via dev eth0



To delete the static route, we can use del option with ip route command:

ip route del via dev eth0


Step 6: To view and manipulate the ARP cache on a Linux system

To view the ARP cache on the system:

ip neighbor show


It will display the IP address, MAC address and network interface

To add the static ARP entry in cache:

sudo ip neighbor add lladdr 08:00:27:cb:7e:f5 dev eth0 nud permanent


Here, we need to specify “ip address”, “MAC address”, “network interface” and “nud permanent” means entry is permanent

Step 7: To manipulate routing policy database

To view routing rules on the system:

ip rule show


It will display the routing rules, matching criteria and action.

To add the routing rule in a routing policy

ip rule add from lookup 20



To delete the routing rule in a routing policy:

ip rule del from lookup 20


To change the rule priority:

ip rule add from lookup 20 priority 10

Here, the lower priority will be evaluated first




In this article, we have discuss about iproute2 utility in a lot more details. we have came across through the usages of different types of iproute2 utilities and their implementations. This article highlights the feature like interface configuration, routing policy, ARP cache entry.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads