View the routing cache and hits

Most of us check the normal thinks like traceroute or arp on a web server, but actually checking recent routing table lookup’s can be a great tool. Doing this you can see if your actually using the right interface or if the application is even requesting the traffic to be routed by your OS.

When debugging a networking issue it can be invaluable to see your linux servers current routes to get an idea of what’s going on, also you can view the number of hits these routes have recently gotten, just look in the use column of the output table.

route -neeC

You should see something like the following output:

root@:/# route -neeC
Kernel IP routing cache
Source          Destination     Gateway         Flags Metric Ref    Use Iface    MSS   Window irtt  TOS HHRef HHUptod     SpecDst             0      0        2 venet0   1500  0      800   0   -1    0    l     0      0       23 lo       0     0      0     0   -1    0             0      0        1 venet0   1500  0      875   0   -1    0    l     0      0       23 lo       0     0      0     0   -1    0             0      0        1 venet0   1500  0      735   0   -1    0

From the above we can see some very interesting stats such as the interface used, source and destination IP’s, metric, number of ‘uses’ and even the interface MTU

Technology enthusiastic with many ongoing online projects one of which is this personal blog PingBin. While also working full time within a data center designing and maintaining the network infrastructure.

Leave a reply:

Your email address will not be published.