Linux 3.6 removed the ipv4 routing cache (commit).
Changelog says:

Remove the ipv4 routing cache. Now lookups go directly into the FIB trie and use prebuilt routes cached there.

According to this question, the routing cache entries are now stored in a "routing exception" structure which is a part of the routing entry.

On my 3.16 (Debian Jessie) standard distribution kernel, I can't see any exceptions and ip route show cache doesn't return anything. The routing table only has a default route:

~#ip route show
default via dev eth0 dev eth0 proto kernel scope link src

Q1: How can I list all of these routing exceptions that are known to the kernel?
Q2: How can I selectively remove such an exception?
Q3: Why does the kernel not select the correct default gateway when trying to ping a certain host:

PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Protocol Unreachable

Addition for Q3: I suspect that this (now obsolete) route was probably stored (somewhere) because of a ICMP redirect. But if ip route show cache does not list routing exceptions and the default route says otherwise - where is this bit of information stored?

2 Answers 2


OK, after much digging I think I have the answers:

A1: Since 3.6 it's no longer possible to list the entire routing cache. You can see the routing cache for specific IPs using ip route get to A.B.C.D but can't list all of them.

A2: ip route flush cache to A.B.C.D removes a single entry from the route cache.

A3: Argh, could have known that: Because it first consults the routing cache a.k.a. FIB (forwarding information base) and after that it looks at the routing table.
See this PDF for a detailed diagram.


lol necro. I'm posting because I'm running into a routing problem with the FIB interfering with a new entry in the routing table. It may not be possible to list all the routes... but you can do a decent lookup with: ip route get command

which will show you if there's an FIB route in play. Additionally, you can also use: ip route match command

For the life of me, I can't find a way to display the whole FIB or manipulate it in any way. I'm sure it will go away if I bounce the interface, but that's a little bit of a pain and may not match all uses cases.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .