With graceful-restart disable, for routes learned from iBGP/eBGP peer(s), "show bgp summary" and "show bgp neigbhor" output might see incomplete Active/Received/Accepted counters than peer advertised after bgp neighbor flapped.
This issue might be seen if the following conditions are met:* The graceful-restart helper mode is disabled explicitly using config* The damping is not enabled
<<<< example output >>>>ebgp neighbor advertising 1M route prefix. In this case, issued router shown "940018" routes in CLI outpout after this neighbor session flapped. (not 100% recurrence rate)
labroot@r02_re> show configuration protocols bgppath-selection always-compare-med;group GROUP1 { type external; local-address 192.168.1.105; minimum-hold-time 30; family inet { unicast; } export [ XXXXX ]; remove-private; peer-as 612345; multipath; neighbor 192.168.1.106;}group IBGP-V4 { type internal; local-address 192.168.13.253; import YYYYY; family inet { unicast { add-path { receive; } } } export [ XXXXX ]; peer-as 654321; neighbor 192.168.219.250 { multipath; } neighbor 192.168.221.251 { multipath; }}precision-timers;accept-remote-nexthop;hold-time 180;advertise-inactive;log-updown;bgp-error-tolerance;graceful-restart { disable;}
< show bgp summary >---(refreshed at 2024-10-23 10:29:06 JST)---Threading mode: BGP I/OGroups: 3 Peers: 5 Down peers: 0Table Tot Paths Act Paths Suppressed History Damp State Pendinginet.0 15227689 15133813 0 0 0 0inet6.0 12 6 0 0 0 0Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...192.168.1.106 612345 1009 4 0 16 1:12 Establ inet.0: 940018/940018/940018/0 <<<<<<<<<<<<<<< expected 1000000192.168.219.250 654321 411 1285 1477 12 7:07 Establ inet.0: 57/33011/33011/0192.168.221.251 654321 14 46 920080 1 2:42 Establ inet.0: 0/0/0/0---(refreshed at 2024-10-23 10:29:11 JST)---Threading mode: BGP I/OGroups: 3 Peers: 5 Down peers: 0Table Tot Paths Act Paths Suppressed History Damp State Pendinginet.0 15227689 15133813 0 0 0 0inet6.0 12 6 0 0 0 0Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...192.168.1.106 612345 1009 4 0 16 1:17 Establ inet.0: 940018/940018/940018/0 <<<<<<<<<<<<<<< expected 1000000192.168.219.250 654321 411 1315 0 12 7:12 Establ inet.0: 57/33011/33011/0192.168.221.251 654321 14 46 920080 1 2:47 Establ inet.0: 0/0/0/0---(refreshed at 2024-10-23 10:29:16 JST)---Threading mode: BGP I/OGroups: 3 Peers: 5 Down peers: 0Table Tot Paths Act Paths Suppressed History Damp State Pendinginet.0 15227690 15133814 0 0 0 0inet6.0 12 6 0 0 0 0Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...192.168.1.106 612345 1010 5 0 16 1:22 Establ inet.0: 940018/940018/940018/0 <<<<<<<<<<<<<<< expected 1000000192.168.219.250 654321 412 1315 0 12 7:17 Establ inet.0: 58/33012/33012/0192.168.221.251 654321 14 46 920080 1 2:52 Establ inet.0: 0/0/0/0
< show bgp neighbor 192.168.1.106 >{master}labroot@r02_re> show bgp neighbor 192.168.1.106Oct 23 10:30:38Peer: 192.168.1.106+60700 AS 612345 Local: 192.168.1.105+179 AS 654321 Description: GROUP1 Group: GROUP1 Routing-Instance: master Forwarding routing-instance: master Type: External State: Established Flags: <Sync RSync> Last State: EstabSync Last Event: RecvKeepAlive Last Error: Cease Export: [ XXXX ALL-REJECT ] Options: <Preference LocalAddress HoldTime AdvertiseInactive RemovePrivateAS LogUpDown AddressFamily PeerAS Multipath Refresh> Options: <MinHoldTime AcceptRemoteNextHop> Options: <GracefulRestartHelperDisabled LLGRHelperDisabled GracefulShutdownRcv> Address families configured: inet-unicast Local Address: 192.168.1.105 Holdtime: 180 Preference: 170 Graceful Shutdown Receiver local-preference: 0 Number of flaps: 16 Last flap event: Stop Error: 'Cease' Sent: 15 Recv: 0 Malformed attributes log interval: 300 route limit: 1000 Peer ID: xxx.xxx.xxx.xxx Local ID: 192.168.13.253 Active Holdtime: 90 Keepalive Interval: 30 Group index: 0 Peer index: 0 SNMP index: 0 I/O Session Thread: bgpio-0 State: Enabled BFD: disabled, down Local Interface: ae54.0 NLRI advertised by peer: inet-unicast NLRI for this session: inet-unicast Peer supports Refresh capability (2) Peer does not support Restarter functionality Restart flag received from the peer: Notification Peer does not support LLGR Restarter functionality Peer supports 4 byte AS extension (peer-as 612345) Peer does not support Addpath NLRI(s) enabled for color nexthop resolution: inet-unicast Table inet.0 Bit: 20000 RIB State: BGP restart is complete Send state: in sync Active prefixes: 940018 <<<<<<<<<<<<<<< expected 1000000 Received prefixes: 940018 <<<<<<<<<<<<<<< expected 1000000 Accepted prefixes: 940018 <<<<<<<<<<<<<<< expected 1000000 Suppressed due to damping: 0 Advertised prefixes: 1 Last traffic (seconds): Received 3 Sent 3 Checked 164 Input messages: Total 1013 Updates 1005 Refreshes 0 Octets 4043411 Output messages: Total 9 Updates 1 Refreshes 0 Octets 210 Output Queue[1]: 0 (inet.0, inet-unicast)
{master}labroot@r02_re>
labroot@r02_re> show route summaryOct 23 10:41:04Autonomous system number: 654321Router ID: 192.168.1.105Maximum ECMP: 32
inet.0: 1000163 destinations, 1124337 routes (1000163 active, 0 holddown, 0 hidden) Direct: 6 routes, 6 active Local: 4 routes, 4 active OSPF: 55 routes, 54 active BGP: 1124262 routes, 1000089 active Static: 9 routes, 9 active LDP: 1 routes, 1 active
inet.3: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden) LDP: 13 routes, 13 active
mpls.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden) MPLS: 6 routes, 6 active LDP: 14 routes, 14 active
inet6.0: 73 destinations, 76 routes (73 active, 0 holddown, 0 hidden) Direct: 7 routes, 7 active Local: 6 routes, 6 active OSPF3: 56 routes, 56 active BGP: 6 routes, 3 active INET6: 1 routes, 1 active
When bgp summary shown wrong number, you might get correct installing route number in FIB/RIB using following command example.
(Note, this is simple example. if you have multiple neighbors, it may not work)
< receiving prefix count from neighbor >{master}labroot@r02_re> show route receive-protocol bgp 192.168.1.106 | countOct 23 10:31:07Count: 1000004 lines
< learned prefix count in FIB >{master}labroot@r02_re> show route forwarding-table all |match 192.168.1.106 | countCount: 1000001 lines
WorkaroundDo not disable the graceful restart helper mode.
Fixed by PR1558678
https://prsearch.juniper.net/problemreport/PR1558678