Friday, January 27, 2012

BGP Memory Usage on a Cisco ISR

Is you ever wanted to know how much memory a BGP route uses on a Cisco ISR Router, take a look at the example below.
__________________

From Cisco:
The memory consumption by BGP routes depends on the number of attributes, such as multipath support, soft reconfiguration, the number of peers, and AS_PATH etc.

When the BGP router receives its neighbors' full BGP routing table (98,410 routes), the router consumes approximately 71 MB. With the AS_PATH filters applied to inbound updates, the size of the BGP routing table is reduced to 31,667 routes, and the memory consumption is approximately 28 MB. This decrease in memory utilization is more than 60 percent with optimal routing.
__________________

Below are (2) BGP peers with 2 static routes and no other attributes applied. You can see the first output with (1) static route and then a second static route was added.


r2#sh ip bgp summ
BGP router identifier 2.2.2.2, local AS number 2 BGP table version is 3, main routing table version 3
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 444 total bytes of memory BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.1        4     1       4       3        3    0    0 00:00:31        1



r2#sh ip bgp
*Mar  1 00:06:57.475: %SYS-5-CONFIG_I: Configured from console by consolep summ BGP router identifier 2.2.2.2, local AS number 2 BGP table version is 8, main routing table version 8
2 network entries using 240 bytes of memory
2 path entries using 104 bytes of memory
3/3 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory BGP using 772 total bytes of memory BGP activity 3/0 prefixes, 3/1 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.1        4     1       9       7        6    0    0 00:03:23        1

     1.0.0.0/32 is subnetted, 1 subnets
S       1.1.1.1 [1/0] via 10.1.1.1
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
S       4.4.4.4 [1/0] via 10.1.1.1
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Serial0/0

No comments:

Post a Comment