How to Check Available Network Routes in Linux

This article will go through how to check available network routes in Linux. Routing is the process of choosing a path for traffic inside or between networks. We are going through several routing commands on Linux.

Check Available Network Routes using Route Command

  • To check available routes, use the route command below.
route -n

Sample output

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.171.2   0.0.0.0         UG    100    0        0 ens33
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 ens33
192.168.171.0   0.0.0.0         255.255.255.0   U     100    0        0 ens33

Check Available Network Routes using IP Command

  • Run the IP command below to check available routes in Linux.
ip route

Sample output

default via 192.168.171.2 dev ens33 proto dhcp metric 100 
169.254.0.0/16 dev ens33 scope link metric 1000 
192.168.171.0/24 dev ens33 proto kernel scope link src 192.168.171.144 metric 100

Check Available Network Routes using netstat Command

  • To check available routes run the following command.
netstat -rn

Sample output

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.171.2   0.0.0.0         UG        0 0          0 ens33
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 ens33
192.168.171.0   0.0.0.0         255.255.255.0   U         0 0          0 ens33
  • That concludes our article on how to check available network routes in Linux.

Read more about Network Routes

Other Tutorials

How to move or copy a directory in Linux

How to copy a file in Linux

How to find path to a command in Linux

System administrator | Software Developer | DevOps

Leave a Comment