Some Notes on BGP and Prefix-Lists

Author
Carole Warner Reece
Architect

I thought I’d post a summary of some BGP questions and follow up responses from a recent group e-mail discussion.

Query 1:

If you filter routes inbound from a neighbor using a route-map/prefix-list, do the routes still end up in the RIB (thus taking up memory) but not in the forwarding table, or do they not even make it into the RIB since they are filtered inbound?  
The application is you need to learn some routes from the ISP.  Is it easier to have them send us all routes and filter them inbound (so if things change you can simply update the filters without waiting for the ISP), or just have them send you the routes we need?

Responses:

A) If you use a prefix-list to filter inbound routes, the routes are not in RIB or even in the local BGP table:

R4#show ip bgp neigh 10.1.34.3 advertised-routes
BGP table version is 3, local router ID is 10.10.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale Origin codes: i – IGP, e – EGP, ? – incomplete

Network          Next Hop            Metric LocPrf Weight Path
*> 10.10.44.0/24    0.0.0.0                  0         32768 i
*> 10.10.45.0/24    0.0.0.0                  0         32768 i

R3#show ip bgp
BGP table version is 2, local router ID is 10.10.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, r RIB-failure, S Stale Origin codes: i – IGP, e – EGP, ? – incomplete

Network          Next Hop            Metric LocPrf Weight Path
*> 10.1o.44.0/24    10.1.34.4                0             0 65004 i

R3#show run | inc prefix-list
neighbor 10.1.34.4 prefix-list IN in
ip prefix-list IN seq 5 permit 10.10.44.0/24

B)  I doubt you’ll get the ISP to give you an à la carte list of prefixes.  Most commonly you can get full or customer-only.  But the reason to take full routes would be that you have a second ISP connection.

Query 2:

As well as the RIB, should I be interested in memory consumption? With soft reconfig, does the router store a copy of all advertisements before filtering?

Response:

The rule of thumb is 1 MB of RAM / 1K routes.  So, for a full table of about 300K routes, you need 300 MB of RAM.

As for memory consumption, the ‘newer’ BGP Soft Reset Enhancement (which uses the route refresh capability) precludes the need for storing all inbound route updates that was needed with the neighbor soft-reconfiguration command process.

To use BGP Soft Reset, both BGP peers must support the soft route refresh capability (this is advertised in the Open message sent with routing table updates.)  Cisco release 12.1 and later IOS supports the BGP Soft Reset / route refresh capability, some 12.2 SX versions as well.

http://www.cisco.com/en/US/products/ps6599/products_data_sheet09186a0080087b3a.html#wp19507
http://www.cisco.com/en/US/docs/ios/iproute/configuration/guide/
irp_bgp_basic_net_ps6017_TSD_Products_Configuration_Guide_Chapter.html#wp1057288

You will have to check to see if this is supported on the ISP and customer’s routers, with the show ip bgp neighbor command, but the feature is supported on 7200s.

Note that the dynamic soft reset does NOT work if soft reconfiguration is configured.

Leave a Reply