It seems that route
and netstat
return almost the same results. What is the difference between them? Why are there two commands giving redundant results? Isn't it better to consolidate the duplication into just a single command?
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0
10.6.0.0 0.0.0.0 255.255.128.0 U 0 0 0 tun0
10.10.0.0 10.6.0.1 255.255.0.0 UG 1000 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
10.6.0.0 0.0.0.0 255.255.128.0 U 0 0 0 tun0
10.10.0.0 10.6.0.1 255.255.0.0 UG 0 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0