Howto show and display routing table on Centos or Redhat RHEL

Howto show and display routing table on Centos or Redhat RHEL

1. Route command

[root@localhost ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.129.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
10.4.3.0 192.168.129.55 255.255.255.0 UG 0 0 0 eth0
10.4.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.129.2 0.0.0.0 UG 0 0 0 eth0

2. Netstat command

[root@localhost ~]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.129.0 * 255.255.255.0 U 0 0 0 eth0
10.4.3.0 192.168.129.55 255.255.255.0 UG 0 0 0 eth0
10.4.2.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.129.2 0.0.0.0 UG 0 0 0 eth0
[root@localhost ~]#
[root@localhost ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.129.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.4.3.0 192.168.129.55 255.255.255.0 UG 0 0 0 eth0
10.4.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.129.2 0.0.0.0 UG 0 0 0 eth0
[root@localhost ~]#

That’s all. Thanks for using IThelpblog.com

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>