BGP Route Scale Calculator
Estimate BGP route-state memory and update pressure from prefix and peer counts, retained paths and route bytes, with budget guardrails.| Measure | Value | Planning meaning | Copy |
|---|---|---|---|
| {{ row.label }} | {{ row.value }} | {{ row.note }} |
| Guardrail | State | Evidence | Next action | Copy |
|---|---|---|---|---|
| {{ row.label }} | {{ row.state }} | {{ row.evidence }} | {{ row.action }} |
Introduction
A router that accepts 950,000 prefixes does not necessarily store 950,000 pieces of route state. Each neighbor can contribute a path for each prefix, and features such as multipath, additional-path advertisement, route reflection, soft reconfiguration, and policy-specific copies can retain more than one path. The forwarding table may contain one selected route while the Border Gateway Protocol (BGP) process holds much more control-plane information.
Capacity planning therefore starts with a scope: the global table, one address family, a virtual routing and forwarding table, a customer view, or another clearly bounded route set. Mixing counts from different scopes makes every later estimate unreliable. A route reflector or route server usually has a different peer and path-retention profile from an edge router even when both see the same prefixes.
- Prefix
- A reachable network destination announced through BGP.
- Retained path
- One stored route choice for a prefix, including its attributes and peer context.
- RIB
- A routing information base. BGP's conceptual model distinguishes received routes, selected local routes, and routes prepared for advertisement.
- Churn
- Route announcements and withdrawals that force policy evaluation and state updates.
Memory grows mainly with prefixes, peers, retained paths per prefix, and bytes per route path. The first three multiply one another. A modest path-retention change can therefore matter more than a similar percentage change in the prefix count. The bytes-per-path and overhead assumptions are platform-specific because vendors store attributes, indexes, counters, and allocator metadata differently.
Update pressure is a separate risk. A design may fit in memory during steady state yet struggle during a route refresh, session reset, policy change, leak, or convergence event. The important workload is not only inbound updates per second, but how many peer-policy evaluations those updates trigger and how much modeled state they revisit during the chosen window.
This kind of estimate is useful for comparing designs and finding dominant multipliers. It cannot certify a platform limit, forwarding capacity, convergence time, or failover behavior. Vendor scale tables, software release notes, real route telemetry, process memory, and controlled lab tests remain the acceptance evidence.
How to Use This Tool:
Build one scenario from a clearly defined route-table scope, then compare it with measurements from the intended platform.
- Enter the Prefixes and Peers for the same address family and routing scope.
- Set Retained paths per prefix from telemetry or configuration. Use 1 only when one stored peer path per prefix is a defensible assumption.
- Enter measured or conservatively estimated Average bytes per route path and a RIB overhead multiplier. Do not include operating-system, forwarding, or unrelated process memory in these route-state inputs.
- Set a positive Route-state memory budget to enable the reserve check. Zero leaves memory status unclassified.
- Add inbound updates, policy fanout, and a churn window for a representative event. Use zero updates only for an intentionally static scenario.
- Review the total estimate and every guardrail, then use peer sensitivity to see whether fanout is the dominant scaling factor.
Interpreting Results:
Total modeled route state combines peer-side path storage, an overhead allowance, and a smaller selected-route allowance. Route-state budget headroom is meaningful only when the budget represents memory intentionally reserved for this route scope.
The guardrails are planning signals, not BGP standards or vendor limits. A clear result still needs platform evidence. A watch or action result identifies the assumption worth testing or changing first.
- Negative memory headroom means the estimate exceeds the configured route-state budget.
- High Peer-policy fanout work points to update-processing pressure, not a measured CPU percentage.
- Touched state may exceed 100% because the heuristic counts repeated work over the churn window; it is not a unique-route percentage.
- Keep prefixes, path retention, route bytes, and policy multiplier fixed when isolating the effect of peer count.
Technical Details:
The model treats each prefix-peer-path combination as one retained path entry. It then estimates the byte footprint and a separate stream of update work. These quantities are deliberately simple enough to audit, but the per-path byte size, overhead multiplier, and selected-route allowance must be calibrated for the intended software and hardware.
Formula Core
Retained entries multiply prefix count by peers and average retained paths. Base bytes then multiply those entries by average route-path bytes.
The overhead multiplier scales peer-side storage. A selected-route allowance equal to 35% of one average path per prefix is added independently.
Update work converts inbound updates to a per-second rate, multiplies by peer and policy fanout, and extends that activity over the selected churn window.
Touched bytes equal touched paths × average path bytes × RIB multiplier. Touched percentage divides that value by total modeled bytes and multiplies by 100. Budget use is total modeled bytes ÷ budget bytes × 100, budget headroom is budget bytes − total modeled bytes, and per-peer bytes divide total modeled bytes by peer count.
| Symbol | Input | Unit |
|---|---|---|
| P | Prefixes in the selected route scope | count |
| N | Peers carrying that scope | count |
| R | Average retained paths per prefix | ratio, at least 1 |
| A | Average bytes per retained route path | bytes |
| M | RIB overhead multiplier | ratio, at least 1 |
| U, F, T | Updates per minute, policy multiplier, and churn-window minutes | count/min, ratio, min |
Rule Core
Five heuristic signals translate the raw estimates into clear, watch, or action states. Boundary operators matter: most bands change at the stated threshold, while memory changes only after crossing 75% or 100% of budget.
| Signal | Clear | Watch | Action |
|---|---|---|---|
| Memory budget used | ≤ 75% | > 75% and ≤ 100% | > 100% |
| Paths per prefix | < 1.8 | ≥ 1.8 and < 3 | ≥ 3 |
| Peers | < 8 | ≥ 8 and < 16 | ≥ 16 |
| Fanout work per second | < 500 | ≥ 500 and < 1,000 | ≥ 1,000 |
| Touched-state percentage | < 25% | ≥ 25% and < 50% | ≥ 50% |
One gibibyte is 1,073,741,824 bytes. Calculations keep full precision; Display precision changes only formatting. Peer sensitivity recomputes the same memory equations at peer counts around the current scenario rather than fitting or extrapolating a trend.
Limitations:
This is a transparent capacity-planning heuristic, not a BGP protocol limit or a vendor sizing guarantee.
- It does not model attribute deduplication, memory allocators, compression, garbage collection, forwarding tables, telemetry processes, or operating-system reserve.
- Update work items are not CPU cycles, convergence seconds, or packets per second.
- Route leaks, path exploration, policy complexity, and session synchronization can produce workloads unlike a steady average update rate.
- Validate final designs with release-specific vendor limits, real route and process telemetry, and representative convergence tests.
References:
- RFC 4271: A Border Gateway Protocol 4 (BGP-4), Internet Engineering Task Force, January 2006.
- RFC 4456: BGP Route Reflection, Internet Engineering Task Force, April 2006.
- RFC 7911: Advertisement of Multiple Paths in BGP, Internet Engineering Task Force, July 2016.