This article explains why routes are present in the router as hidden routes, even though the BGP peer from which they are learned is no longer in the Established state.
Routes from a BGP peer are not removed and remain as hidden routes even though peer is no longer up.
As seen below, the BGP peer 20.1.1.2 is in Active state
lab@M320-RE0# run show bgp summary Groups: 1 Peers: 1 Down peers: 1 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 1 0 0 1 1 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 20.1.1.2 2 21 20 0 1 5 Active
lab@M320-RE0# ...protocol bgp 20.1.1.2 inet.0: 6 destinations, 6 routes (5 active, 0 holddown, 1 hidden ) [edit] lab@M320-RE0# ...l bgp 20.1.1.2 hidden inet.0: 6 destinations, 6 routes (5 active, 0 holddown, 1 hidden) Prefix Nexthop MED Lclpref AS path 1.1.1.1/32 20.1.1.2 2 I [edit] lab@M320-RE0# ...0.1.1.2 hidden detail inet.0: 6 destinations, 6 routes (5 active, 0 holddown, 1 hidden) 1.1.1.1/32 (1 entry, 0 announced) Accepted Nexthop: 20.1.1.2 AS path: 2 I
The Routes from the BGP peer remain even though it is not in Established state, because damping is enabled. With damping enabled, as soon as the BGP peer goes down, the routes learned from it are stored as history routes to maintain damping parameters for it, as seen below:
Initially BGP peer is up:
lab@M320-RE0# run show bgp summary Groups: 1 Peers: 1 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 1 1 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 20.1.1.2 2 41 41 0 1 17:17 1/1/1/0 0/0/0/0
There is nothing in damping history:
lab@M320-1-RE0# run show route damping history inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
[edit] lab@M320-RE0# run show bgp summary Groups: 1 Peers: 1 Down peers: 1 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 1 0 0 1 1 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 20.1.1.2 2 44 43 0 2 5 Active
[edit] lab@M320--RE0# run show route damping history inet.0: 6 destinations, 6 routes (5 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 1.1.1.1/32 [BGP ] 00:18:33, localpref 100 AS path: 2 I, validation-state: unverified > to 20.1.1.2 via ge-1/0/0.0 lab@M320-RE0# run show route damping history detail inet.0: 6 destinations, 6 routes (5 active, 0 holddown, 1 hidden) 1.1.1.1/32 (1 entry, 0 announced) BGP /-101 Next hop type: Router, Next hop index: 518 Address: 0x143c00f4 Next-hop reference count: 1 Source: 20.1.1.2 Next hop: 20.1.1.2 via ge-1/0/0.0, selected Session Id: 0x18c State: <Hidden Ext> Local AS: 1 Peer AS: 2 Age: 45:51 Validation State: unverified Task: BGP_2.20.1.1.2 AS path: 2 I Accepted Localpref: 100 Router ID: 1.1.1.1 Merit (last update/now): 740/282 Default damping parameters used Last update: 00:20:58 First update: 00:27:30 Flaps: 1 History entry. Expires in: 00:07:40
[edit] lab@M320-RE0# ...l bgp 20.1.1.2 hidden inet.0: 6 destinations, 6 routes (5 active, 0 holddown, 1 hidden) Prefix Nexthop MED Lclpref AS path 1.1.1.1/32 20.1.1.2 2 I
This is expected behavior with BGP damping enabled. It will not be seen if we disable BGP damping. For instructions, see Example: Configuring BGP Flap Damping .