IGP/LDP/BGP Convergence Tuning (IOS/IOS-XE)


This is a reference of commands, this is not a config to be applied as is...

conf t

! Pass link-down events directly to the IGP rather than to RIB which causes a CEF update which then triggers IGP recalculation and then RIB and CEF updates again!

ip routing protocol purge interface

! Set the global BFD control packet tx delay to 5 seconds

bfd slow-timers 5000

! Enable targeted LDP sessions to the unicast address of neighbours rather than multicasts to protect LDP sessions against link failure

mpls ldp session protection

! Enable the acceptance of targeted LDP hello requests (default is to ignore)

mpls ldp discovery targeted-hello accept

! Optimise the LDP session initiation

mpls ldp discovery quick-start

! Limit the IGP LDP sync time (default is no limit) when IGP has re-convereged

mpls ldp igp sync holddown 600000

! Enabled LDP label allocation filtering - here we restrict label allocation to host routes (/32's) only

mpls ldp label allocate global host-routes

! Further to the above - we can also restrict the IP prefixes we allocate labels for, so we will only allocate labels to /32s in the specified IP prefix list

ip prefix-list PL-Core-Loopbacks seq 10 permit ge 32
mpls ldp label allocate global prefix-list PL-Core-Loopbackps
interface gi0/0

! Change the interface carrier delay to 0 msec (from default 2 seconds or 10 msec for fibre?) so there is no delay between the interface being detected as down and telleing the RIB it's down

carrier-delay msec 0
! On supported platforms the up and down delay can be seperate (msec) values, so BFD can signal a link down as soon as it's detected as down but this will delay the link being seen as up again incase it is flapping
carrier-delay down 0 up 2000 ! Enable interface IP event dampening to protext against rapid link flaps from the above dampening ! Set the BFD send and receive delay to be 50 msec and set the dead detection to be 3x 50msex == 150msec bfd interval 50 min_rx 50 multiplier 3 ! Enable BFD echo mode here so we send the control packets every slow-timers interval. This is enabled by default. bfd echo ! Disabel BFD echo mode (which switches to asynchronous mode) for platforms that don't support BFD hardware offload like ME3800 no bfd echo ! Disable DR/BDR election on point-to-point links where they aren't needed ip ospf network point-to-point isis network point-to-point isis bfd
router isis

! Syncronise LDP and IGP convergence so that new links aren't used by the IGP until LDP is ready

mpls ldp sync

! When this device starts up, use the maximum metric for type 1 LSAs until BGP has converged

set-overload-bit on-startup wait-for-bgp

bfd all-interfaces
spf-interval 5 50 200
prc-interval 5 50 200
spf-interval 5 50 200
sp-gen-interval 5 50 200
fast-flood 10
router ospf 1

log-adjacency-changes detail ! Enable OSPF only where we need to passive-interface default

! When this device starts up, use the maximum metric for type 1 LSAs until BGP has converged

max-metric router-lsa on-startup wait-for-bgp ! Enabled BFD for IGP integration bfd all-interfaces ! Enable incremental SPF ispf ! Thottle LSA generation timers throttle lsa 10 20 5000 ! Thorrtle SPF runs on received LSAs and locally triggered events timers throttle spf 50 50 5000 ! Group "pace" LSA flooding timers pacing flood 15 ! Limit LSA processing when receiving the same LSA timers lsa arrival 15 ! Limit LSA retransmition to be hreater than the minimum receive interval above timers pacing retransmission 45 ! Suppress advertisements for transit link IPs (Loopbacks and seconadry IPs are still advertised) by removing the type 3 LSAs, to reduce IGP table size prefix-suppression ! Limit the number of ECMP to 1 effectively disabling ECMP (if for example the ECMPs are via different PE rather than multiple links to the same next-hop PE, this can give predictable forwarding and failover behvaiour) maximum-paths 1 ! Syncronise LDP and IGP convergence so that new links aren't used by the IGP until LDP is ready mpls ldp sync
router bgp XXXXX

! Enabled BGP slow peer detection (at least to log slow peers)

neighbor x.x.x.x slow-peer detection

! Enable dynamic BGP update group splitting when a slow peer is detected so that the rest of the BGP update group isn't hindered by the transmission cache is full. Unless the "permanent" keyword is given the peer will dynamically move back to it's normal update group once it "passes" the slow-peer detection again

neighbor x.x.x.x slow-peer split-update-group dynamic

! Lower the default update advertisement interval for BGP neighbours (default is 5 seconds for iBGP, 30 seconds for eBGP in GRT and 30 seconds for eBGP in VRF - newer IOS versions have iBGP default to 0 and eBGP in VRF default to 0)
neighbor x.x.x.x advertisement-interval 0

! Enabled BFD for directly connected iBGP neighbours (no dampening for fall-over, link flap caution!)

! ! neighbor x.x.x.x fall-over bfd

! We can track the next-hop address for multi-hop iBGP neighbours by removing the BFD keyword (no dampening for fall-over, loss of next hop means immediate session tear down!)

! ! neighbor x.x.x.x fall-over

! BGP NHT would be preferable over fall-over for stability: BGP Next-Hop Tracking is enabled by default in supporting images, lower the BGP trigger event to 1 second (default 5) to react quicker to the tunned IGP which is updating the RIB with details relating to BGP next hop address

! ! bgp nexthop trigger delay 1

! Lower BGP timers if BFD or similar isn't available

neighbor x.x.x.x timers 1 3

! For directly connected eBGP neighbours use interface tracking for session tear down (default enabled)

bgp fast-external-fallover


Previous page: BFD
Next page: LAG, ECMP, MPLS-TE: Tech Overview