Some Notes on BGP and Prefix-Lists

Carole Warner Reece

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?


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 advertised-routes
BGP table version is 3, local router ID is
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
*>                  0         32768 i
*>                  0         32768 i

R3#show ip bgp
BGP table version is 2, local router ID is
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                0             0 65004 i

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

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?


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.

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


Nick Kelly

Cybersecurity Engineer, Cisco

Nick has over 20 years of experience in Security Operations and Security Sales. He is an avid student of cybersecurity and regularly engages with the Infosec community at events like BSides, RVASec, Derbycon and more. The son of an FBI forensics director, Nick holds a B.S. in Criminal Justice and is one of Cisco’s Fire Jumper Elite members. When he’s not working, he writes cyberpunk and punches aliens on his Playstation.


Virgilio “BONG” dela Cruz Jr.

CCDP, CCNA V, CCNP, Cisco IPS Express Security for AM/EE
Field Solutions Architect, Tech Data

Virgilio “Bong” has sixteen years of professional experience in IT industry from academe, technical and customer support, pre-sales, post sales, project management, training and enablement. He has worked in Cisco Technical Assistance Center (TAC) as a member of the WAN and LAN Switching team. Bong now works for Tech Data as the Field Solutions Architect with a focus on Cisco Security and holds a few Cisco certifications including Fire Jumper Elite.


John Cavanaugh

CCIE #1066, CCDE #20070002, CCAr
Chief Technology Officer, Practice Lead Security Services, NetCraftsmen

John is our CTO and the practice lead for a talented team of consultants focused on designing and delivering scalable and secure infrastructure solutions to customers across multiple industry verticals and technologies. Previously he has held several positions including Executive Director/Chief Architect for Global Network Services at JPMorgan Chase. In that capacity, he led a team managing network architecture and services.  Prior to his role at JPMorgan Chase, John was a Distinguished Engineer at Cisco working across a number of verticals including Higher Education, Finance, Retail, Government, and Health Care.

He is an expert in working with groups to identify business needs, and align technology strategies to enable business strategies, building in agility and scalability to allow for future changes. John is experienced in the architecture and design of highly available, secure, network infrastructure and data centers, and has worked on projects worldwide. He has worked in both the business and regulatory environments for the design and deployment of complex IT infrastructures.