Lab3 Backup Path
Load lab3.init.cfg
#R1, R6
configure replace unix:lab3.init.cfg
#R2-R5
configure
load bootflash:lab3.init.cfg
commit replace
y

R5 is setting LP to 50 on routes received from R6. Configure the core so that R4 is always used as the primary path, but if that path is lost, the core will immediately re-route to using R5.
Answer
https://www.youtube.com/watch?v=WpG81qm2PHE&list=PL3Y9eZjZCcsejbVWD3wJIePqe3NiImqxB&index=4
#R5
router bgp 65000
add ipv4 unicast
advertise best-external
add ipv6 unicast
advertise best-external
#R2, R3, R4
route-policy INSTALL_BACKUP
set path-selection backup 1 install
end-policy
!
router bgp 65000
address-family ipv4 unicast
additional-paths selection route-policy INSTALL_BACKUP
!
address-family ipv6 unicast
additional-paths selection route-policy INSTALL_BACKUP
Explanation/Verification
Before making any changes, notice that R5 is hiding its external path. This is because its iBGP path via R4 is better than its eBGP path due to local preference. On R3, we only see R4’s path to R6’s prefixes.

First we must configure R5 to advertise its external path. We can either use PIC, or simply use the advertise best-external feature. This allows R5 to advertise its eBGP path even when the iBGP path is best, and does not require PIC.
#R5
router bgp 65000
add ipv4 unicast
advertise best-external
add ipv6 unicast
advertise best-external
We now see both paths on R3.

We need to tell R3 to install additional paths as repair paths in the FIB. On IOS-XR, when you use add-path you select and install the paths at the same time with an RPL. There is no separate “install” command as there is with IOS-XE.
RP/0/0/CPU0:R3(config-bgp-af)#additional-paths ?
receive Additional paths Receive capability
selection Additional paths selection
send Additional paths Send capability
We must create an RPL that matches which routes to select and the action to take (”install” or “advertise” or both “install advertise”).
RP/0/0/CPU0:R3(config-rpl)#set path-selection ?
all BGP all paths
backup BGP backup path
best-path BGP best path
group-best BGP group best path
multipath BGP multipath
RP/0/0/CPU0:R3(config-rpl)#set path-selection backup 1 ?
advertise Advertise the path
install Install the path
If desired we can both advertise and install in one command:
RP/0/0/CPU0:R3(config-rpl)#set path-selection backup 1 install ?
advertise Advertise the path
multipath-protect Mutlipath Protect
However, in this lab, we are not advertising additional paths. We are simply installing a backup route.
#R2, R3, R4
route-policy INSTALL_BACKUP
set path-selection backup 1 install
end-policy
!
router bgp 65000
address-family ipv4 unicast
additional-paths selection route-policy INSTALL_BACKUP
!
address-family ipv6 unicast
additional-paths selection route-policy INSTALL_BACKUP
We now see that the backup path is marked when showing information about each prefix.


The backup path has been installed as a repair route in the FIB:


We must do this on all other iBGP routers (R2 and R4) to ensure that they all install R5’s path as a repair path. Remember that this is different from the previous labs in which we used ECMP or UCMP. In those cases, we were load sharing between R4 and R5. But now we only use R4 alone, and only failover to using R5’s path if the path through R4 is lost.
Note that R5 also automatically installs the repair routes due to the advertise best-external feature being enabled.
Last updated