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.

|     |
|     |

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?

  • 5
    There isn't a one-size fits all answer... every IOS train has different memory footprints per-prefix... plus eBGP load-balancing, soft-reconfig-inbound, and other options affect memory requirements as well. The unpleasant reality: go to MemoryX or similar and stuff as much as you can in the router. When you get low, buy a router with a lot more DRAM Jul 30, 2013 at 17:02
  • I agree, which is why I specified Cisco 7301's with NPE-G1's. Also there is no soft-reconfiguration inbound here.
    – Baldrick
    Jul 30, 2013 at 22:18
  • 2
    since a) memory is very cheap these days, b) it's not easy to predict BGP / RIB / FIB memory utilization, and c) the internet table is always growing... why not just fill the box up with memory and relax? If you're a NSP, bandwidth costs are very high compared to the cost of memory Jul 31, 2013 at 1:09
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
    – Ron Maupin
    Jan 5, 2021 at 18:23

1 Answer 1


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.

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.