Cisco – Calculating Cisco router memory requirements for full BGP feeds

bgpciscomemory

This scenario is a network with four routers in a square; each has a connection to a different transit provider with a full BGP table from each.

R1----R2
|     |
|     |
R3----R4

How do I calculate the (BGP) memory requirement for one of these routers? (not including IGP and LDP/RSVP etc)

In this example network all routers are Cisco 7301's with NPE-G1. Graphing the memory usage on them, they are all currently around the 500MB mark of used RAM, and the BGP table is approaching 500k prefixes (circa 470k at the time of writing). I know there is typically a margin of deviation here, but is there a rough way I can calculate how much memory a router needs if it is going to take a full BGP feed. It only needs to be rough, because if say 500k prefixes requires 500MBs, and 600k prefixes requires 600MBs of RAM, I'm not going to drop in a router that has exactly that much RAM, otherwise it has no growth room. So I'm after a rough method. Lets say I want to add a 5th router into this ring between R3 & R4, connected to another transit provider with a full BGP table feed; How do I work out how much RAM that router needs?

Best Answer

From my experience I usually go for: - 20 prefixes taking usually 1 kbyte of memory - 20 network entries usually take 2.5 kbytes of memory

Then we have to add some memory for AS-Path entries, for BGP path/bestpath entries and for community entries, usually with 10 prefixes for 0.8 kbytes of memory.

Bear in mind that if you add another router bringing 500k prefixes it will probably require memory only for the prefix table and doubtfully no for network tables as this is already filled up from the other neighbors.

Based on these computations I would assume for 170 Mbytes of memory for a router peering with two 500k prefixes eBGP neighbors.

Related Topic