Redhat Routing with ip Command

ip command can be used as follows below:Show / manipulate routing

Show / manipulate devices

Policy routing


Type the following command to display:

$ ip route show


$ ip route list

Sample Outputs: dev ppp0 proto kernel scope link src dev eth0 proto kernel scope link src dev ra0 proto kernel scope link src

default via dev ra0 metric 100

Set a Route to the Locally Connected Network

Type the following command to sent all packets to the local network directly through the device ens192:, enter:

# ip route add dev ens192
Set a default route

All network packets that cannot be sent according to the previous entries of the routing table are sent through the following default gateway

# ip route add default via
Delete route from table

Type the following command

# ip route delete dev ens192

How do I verify routing configurations?
Use the ping/host commands to make sure you can reach to your gateway:

ping Your-Gateway-Ip-Here

ping Your-DNS-Server-IP-Here



Source:ip route rhel 7