Route cache?



  • i have multiple routers behind pfsense running OSPF. i am distributing routes into rip and rip is enabled on the pfsense LAN interface.

    when i disable rip on the pfsense LAN interface the routes stay in the routing table for a while..haven't figured out how long yet but it's been about 8 minutes now..  how long do the routes stay cached in the routing table.  if i reboot the routes are flushed and i get the expected results.

    can anyone enlighten me to how the routing cache works?

    thanks,



  • The kernel itself doesn't do any route expiry or maintenance, this all happens in userland by a routing server, which for RIP is routed(8). So when you shut off RIP in pfSense, the routed process gets shut down and no longer expires old routes from the kernel tables, and the kernel routing table stays in the state it was in when RIP was shut down. This seems the most logical behaviour when shutting down RIP.

    I don't think the kernel knows what the source of each route is, so thus I don't think there's a way to just flush RIP-sourced routes either. There might be a way to instruct routed to flush all its routes from the kernel table when it's shutting down, but I can't find one with a quick read of the man page.

    You can, however, manually flush all gateway routes with 'route flush'.



  • That makes sense. Thanks for the explanation.


Log in to reply