Search routing table by subnet mask
Posted: Tue Dec 22, 2015 7:27 pm
So I recently ran into an issue where one of my BGP peers was sending me very specific routes smaller than /24 causing some routing loops within our internal network.
Is there a way to search the routing table for routes based on subnet mask or prefix length?
I have three BGP peers and over 1.5million routes so running a "ip route print where 'string' in dst-address" would take forever to complete even on a CCR and I don't think it would accomplish the goal...
I've adjusted my filters to remove routes smaller than /24, the routing count went down for the peer but I wanted to confirm visually.
Is there a way to search the routing table for routes based on subnet mask or prefix length?
I have three BGP peers and over 1.5million routes so running a "ip route print where 'string' in dst-address" would take forever to complete even on a CCR and I don't think it would accomplish the goal...
I've adjusted my filters to remove routes smaller than /24, the routing count went down for the peer but I wanted to confirm visually.