This article explains one of the reasons why the number of active BGP prefixes can be different between 'show bgp summary' and 'show route summary' outputs.
'show bgp summary'
'show route summary'
There are cases when the router can be configured with two or more route-reflector neighbors and receiving identical update messages from both the RRs with the same nexthop and other information associated with the route. It can be done for redundancy purposes and the following mismatch can occur:
The output of 'show route summary' shows that only half of the routes are in active state while the rest of the routes are not installed in the routing table:
labroot@lab-re0> show route summary Autonomous system number: 65500 Router ID: 10.16.53.9 inet.0: 119 destinations, 220 routes (119 active, 0 holddown, 0 hidden) Direct: 8 routes, 8 active Local: 5 routes, 5 active BGP: 200 routes, 100 active ....
However, the output of 'show bgp summary' reveals that the number of active paths are equal to the number of total paths:
labroot@salo-re0> show bgp summary Groups: 3 Peers: 8 Down peers: 6 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 200 200 0 0 0 0
inet6.0 0 0 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 10.100.1.2 65500 3 3 0 3 16 Establ inet.0: 100/100/100/0 10.200.1.2 65500 4 3 0 3 12 Establ inet.0: 100/100/100/0
The output we are seeing from 'show bgp summary' output may seem strange because half of the routes which contain exactly the same nexthops should not appear on the active paths row, as in 'show route summary' output. However, this is the expected behavior and is functioning as designed.
In this case, the router is receiving identical update messages from both the RRs with the same nexthop and other information associated with the route. In order to reduce the multipath calculation job (to decrease CPU utilization), the following is checked:
Whenever a route is considered as a Multipath Contributor, from BGP’s perspective, that route’s count is considered in the active prefixes count. This has been the behavior since day 1 and this is the reason multi path contributor routes are considered, while maintaining the active prefixes count in BGP statistics. Hence, the counts seen in 'show route summary' and in 'show bgp summary' do not match because they have come from different methods of calculation.
2018-06-09: Minor sentence clarification. No technical changes.