PacketLab
BGP · Convergence and Security

Next-Hop Tracking

React to recursive next-hop reachability changes rather than waiting only for a periodic table scan.

Three internal peers and two candidate next hops

R1, R2 and R3 share AS65123. OSPF advertises their loopbacks over a shared LAN. R2 and R3 both originate their separate connected /30 in BGP, so R1 has candidate next hops 10.255.0.2 and 10.255.0.3.

Shared underlay and separate BGP prefixPhysical links
Shared 192.0.2.0/29Test prefix 192.0.2.8/30R110.255.0.1/32R210.255.0.2/32R310.255.0.3/32
GigabitEthernet1 uses .1, .2 and .3 on the shared /29. R2/R3 GigabitEthernet2 uses .9 and .10 on the /30. iBGP is a full mesh over loopbacks.
Complete baseline configurations

R1

hostname R1
ip cef
interface Loopback0
 ip address 10.255.0.1 255.255.255.255
exit
interface GigabitEthernet1
 ip address 192.0.2.1 255.255.255.248
 no shutdown
exit
router ospf 1
 router-id 10.255.0.1
 network 10.255.0.1 0.0.0.0 area 0
 network 192.0.2.1 0.0.0.0 area 0
 passive-interface Loopback0
exit
router bgp 65123
 bgp router-id 10.255.0.1
 no bgp default ipv4-unicast
 neighbor 10.255.0.2 remote-as 65123
 neighbor 10.255.0.2 update-source Loopback0
 neighbor 10.255.0.3 remote-as 65123
 neighbor 10.255.0.3 update-source Loopback0
 address-family ipv4 unicast
  neighbor 10.255.0.2 activate
  neighbor 10.255.0.3 activate
 exit-address-family
end

R2

hostname R2
ip cef
interface Loopback0
 ip address 10.255.0.2 255.255.255.255
exit
interface GigabitEthernet1
 ip address 192.0.2.2 255.255.255.248
 no shutdown
exit
interface GigabitEthernet2
 ip address 192.0.2.9 255.255.255.252
 no shutdown
exit
router ospf 1
 router-id 10.255.0.2
 network 10.255.0.2 0.0.0.0 area 0
 network 192.0.2.2 0.0.0.0 area 0
 passive-interface Loopback0
exit
router bgp 65123
 bgp router-id 10.255.0.2
 no bgp default ipv4-unicast
 neighbor 10.255.0.1 remote-as 65123
 neighbor 10.255.0.1 update-source Loopback0
 neighbor 10.255.0.3 remote-as 65123
 neighbor 10.255.0.3 update-source Loopback0
 address-family ipv4 unicast
  neighbor 10.255.0.1 activate
  neighbor 10.255.0.3 activate
  network 192.0.2.8 mask 255.255.255.252
 exit-address-family
end

R3

hostname R3
ip cef
interface Loopback0
 ip address 10.255.0.3 255.255.255.255
exit
interface GigabitEthernet1
 ip address 192.0.2.3 255.255.255.248
 no shutdown
exit
interface GigabitEthernet2
 ip address 192.0.2.10 255.255.255.252
 no shutdown
exit
router ospf 1
 router-id 10.255.0.3
 network 10.255.0.3 0.0.0.0 area 0
 network 192.0.2.3 0.0.0.0 area 0
 passive-interface Loopback0
exit
router bgp 65123
 bgp router-id 10.255.0.3
 no bgp default ipv4-unicast
 neighbor 10.255.0.1 remote-as 65123
 neighbor 10.255.0.1 update-source Loopback0
 neighbor 10.255.0.2 remote-as 65123
 neighbor 10.255.0.2 update-source Loopback0
 address-family ipv4 unicast
  neighbor 10.255.0.1 activate
  neighbor 10.255.0.2 activate
  network 192.0.2.8 mask 255.255.255.252
 exit-address-family
end

Open plain-text configurations

Outputs are illustrative, not recorded router results. Each lab starts from its own baseline. Configuration and feature support vary by image and release; platform-specific examples identify their prerequisites.
R1# show ip bgp
     Network          Next Hop        Metric LocPrf Weight Path
*>i  192.0.2.8/30     10.255.0.2           0    100      0 i
* i  192.0.2.8/30     10.255.0.3           0    100      0 i

Separate event detection from scanning

BGP needs a usable route to a next hop before selecting its path. Next-hop tracking registers dependencies with the routing system. A change in recursive reachability schedules affected BGP processing without relying solely on a periodic full scan. Detection, a configured trigger delay, best-path work and forwarding programming are separate parts of convergence.

Inspect and tune the trigger delay

On an image supporting this command, set a one-second trigger delay on R1 for the isolated experiment. Defaults and additional dampening behavior vary by release; a smaller delay is not automatically better under instability.

router bgp 65123
 address-family ipv4 unicast
  bgp nexthop trigger delay 1
 exit-address-family
R1# show ip bgp nexthop
Current BGP nexthop cache:
10.255.0.2 valid [metric 2]
10.255.0.3 valid [metric 2]

This compact excerpt represents the dependency state, not a measurement of exact convergence time.

Remove only one recursive route

On R2, stop advertising Loopback0 in OSPF while leaving the shared interface and BGP configuration intact. This isolates loss of next-hop reachability from an immediate physical link shutdown.

router ospf 1
 no network 10.255.0.2 0.0.0.0 area 0
R1# show ip route 10.255.0.2
% Network not in table
R1# show ip bgp
     Network          Next Hop        Metric LocPrf Weight Path
*>i  192.0.2.8/30     10.255.0.3           0    100      0 i

After the IGP update and triggered evaluation, the R2 candidate cannot be used. The R3 candidate remains reachable. The TCP session to R2 may fail later; BGP need not wait for its hold timer before rejecting an unresolved next hop.

Distinguish two kinds of dampening

Next-hop event dampening can coalesce repeated recursive changes to limit churn. It is different from route-flap dampening, which scores received path instability and can suppress a prefix. Do not assume the same penalty counters or commands control both. Measure event timestamps and forwarding loss in a real lab before choosing timers.

Restore reachability

router ospf 1
 network 10.255.0.2 0.0.0.0 area 0

R1

router bgp 65123
 address-family ipv4 unicast
  no bgp nexthop trigger delay 1
 exit-address-family
R1# show ip route 10.255.0.2
Routing entry for 10.255.0.2/32
  Known via "ospf 1", distance 110, metric 2
  * 192.0.2.2, via GigabitEthernet1

Both BGP candidates become eligible again after routing and session state recover. A timer reset restores the image’s default; it does not promise a universal default value across platforms.

Key Takeaways

  • Next-hop tracking reacts to recursive route changes.
  • A path with an unresolved next hop is unusable.
  • Triggered evaluation need not wait for a BGP hold timeout.
  • Trigger delay and instability handling are separate tuning controls.
  • Next-hop dampening is not route-flap dampening.

Next-Hop Tracking Quiz

Six questions · four options each · select one answer per question. Submit all answers to see your score and explanations.

1. What event is isolated in this lab?
2. Which next hop remains usable after that change?
3. Must BGP wait for the hold timer to reject an unresolved next hop?
4. What does a trigger delay do?
5. Is next-hop event dampening the same as route-flap dampening?
6. What proves an exact recovery duration?
Protocol and command references

Next-hop tracking configuration · Router-symbol attribution.