How To Display / Delete IP Route Cache on Linux

By Angsuman Chakraborty, Gaea News Network
Saturday, October 20, 2007

While configuring your routing (like load balancing with dual ADSL connections) you would often need to view the current route cache and also to occasionally delete the current cache. Here is how you can do it.

How to display the route cache

ip route show cache

A sample entry from the list is:
217.212.227.18 from 172.16.0.69 via 192.168.0.1 dev eth2 src 172.16.0.50
cache mtu 1500 advmss 1460 hoplimit 64 iif eth0

This tells us that all requests from 172.16.0.69 (my machine’s IP) to 217.212.227.18 (Akamai machine) gets routed via eth2 interface using the gateway 192.168.0.1 (Tata Indicom Broadband).

How to delete the route cache

ip route flush cache

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :