I have two different ISP's and two routers that are configured with eBGP between the ISP's and iBGP between the two routers. I am getting full routes plus a default route. I have 2 network addresses ISP A 10.117.125.0 /24 and ISP B 10.51.170.0 /24. (I have changed the ip addresses for this example. ) I would like it if ISP A fails then ISP B will route that subnet. This happened the other day and it did not work. The ISP is setup correctly and i see that i am missing a network statement, but is there anything else in this config that is wrong?
only prepending of your own AS number is recommended for the BGP rule that silently discards BGP advertisements with an AS Path attribute that already contains your own AS number.
So the best practice for prepending is to use your own AS number.
set as-path prepend 25 25
About the config example you have linked:
you have written you are receiving BGP full tables from both providers.
the ip as path access-list of example provide better preference for all routes with an AS path attribute that is made of only the provider AS number.
ip as-path access-list 1 permit ^400$
this means an AS path that starts with 400 (^ symbol) and ends just after it ($ symbol).
In other words in your scenario this part is not effective:
routes originated in AS 400 (representing ISPB) are preferred for their shortest AS path over the routes received from ISP A that have an AS path made of at least
"300 400 i"
or longer if the two have no direct relationship (peering)
longer then "400 i"
these routes are exchanged over the iBGP session.
Hope to help