You can display the routing table by using the command netstat -rn or route -n in a Linux system. The first column of the routing table shows the destination and the second column of the routing table tells how to reach to the destination.
Linux (RHEL 6.8)
Use the netstat command to print the routing table.
[root@TestServer /]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.62.202.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.65.32.0 10.62.202.8 255.255.255.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.62.202.8 0.0.0.0 UG 0 0 0 eth0
|
Use the route command to print the routing table.
[root@TestServer /]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.62.202.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.65.32.0 10.62.202.8 255.255.255.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.62.202.8 0.0.0.0 UG 0 0 0 eth0
|
No Responses