I would like to know if it's possible to prevent some BGP prefixes from entering the RIB.

I'm receiving full internet routes from 2 ISPs, and I'm getting duplicate paths in BGP table, but only the best goes to the RIB. However, my routers have a limitation on the number of routes allowed in the RIB, and I would like to prevent some BGP routes from entering the RIB (more specifically, the ones that are tied, so that the router just uses the default route).

I know all kind of filtering can be done to prevent routes from entering the BGP table, but is it possible to use route-maps to do what I want? Where would I apply them? Thanks!

  • I know the redistribute commands on Cisco CLI, there you can "put" routes from bgp to rip, shouldn't be much different on different IOS. Also a part of your configuration and what device you use would be helpful.
    – Eggi
    Commented Sep 5, 2016 at 9:31
  • When you redistribute between 2 routing protocols you can always filter using a route-map. But you never redistribute from the BGP table to the RIB, and you don't even enter a command for that, the best routes are simply installed automatically. What I am trying to know is if there s any way of filtering these best routes, the way I would do in a redistribution. Note: These devices are Brocade, which configurations are very Cisco-like.
    – user30260
    Commented Sep 5, 2016 at 9:33
  • Ok, forget the retribution, read RIP not RIB. One thing i can think of is using the neighbor command. example: neighbor {ip-address| peer-group-name} remote-as autonomous-system-number neighbor {ip-address| peer-group-name} route-map map-name {in | out} and configure your route map for the ip adresses you want to route.
    – Eggi
    Commented Sep 5, 2016 at 9:42
  • cisco site link Uses the distribute command in the router bgp config. Try this.
    – Eggi
    Commented Sep 5, 2016 at 9:47
  • Hope you also have a default route if you do this
    – user88975
    Commented Sep 6, 2016 at 12:51

2 Answers 2


You may filter same way as you would filter bogon networks with prefix lists. For example:

ip prefix-list rfc1918 deny le 32

router bgp xxx
 neighbor x.x.x.x prefix-list rfc1918 in

But routers with full BGP feeds should avoid default routes.

Other ways to filter incoming prefixes is to use distribute lists with access-lists.

  • Thank you, but you missed the point. You are still filtering BGP prefixes from entering BGP table. I want to allow all prefixes INTO the BGP table, from both ISPs. I then want to filter WHAT GOES INTO the RIB. Assuming that is possible.
    – user30260
    Commented Sep 5, 2016 at 11:25

I found what I was looking for. It is possible to filter BGP routes from entering the RIB. You just have to use the table-map command to filter using a route-map. http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-3s/irg-xe-3s-book/bgp-selective_route_download.pdf

Thanks anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.