12-06-2024 12:01 AM
Dear Community,
We have total 5 sites in our network. All 5 sites are inter-connected via BGP in MPLS could.
Site A & Site B has only internet link to forward any internet traffic to web.
Site C, D & E should use Site B's internet link as Primary Gateway as their traffic will reach to Site-A via MPLS cloud.
In case of Failure of Internet link at Site-B how we can enable auto failover of default Route for remote sites C, D & E towards Site-A. Thier Internet traffic should automatically choose path over BGP reach to Site-A for reaching out to internet gateway.
Let me know if any additional info. is required.
Solved! Go to Solution.
12-06-2024 02:47 AM
Hello @nocitinfra
Enable auto-failover for default routes at Sites C, D, and E ; you could configure BGP to advertise a primary default route (0.0.0.0/0) from Site B and a backup default route from Site A. This ensures that under normal conditions, Sites C, D, and E use Site B's internet link as the gateway for outgoing traffic, while the route from Site A acts as a fallback.
To achieve this, you can assign a lower BGP metric (MED) or higher local preference to the default route from Site B to make it preferred. Site B's internet link should be monitored using IP SLA with tracking. If the link fails, Site B automatically withdraws its default route, causing Sites C, D, and E to reroute traffic to Site A's internet link via the BGP backup route. This setup ensures dynamic failover without manual intervention while maintaining routing efficiency during normal operation...
---
On Site B (primary route advertisement):
ip sla 1
icmp-echo 8.8.8.8 source-interface <interface-to-internet>
frequency 5
ip sla schedule 1 life forever start-time now
track 1 ip sla 1 reachability
ip route 0.0.0.0 0.0.0.0 <internet-gateway>
router bgp <ASN>
network 0.0.0.0
neighbor <MPLS-peer> route-map DEFAULT_ROUTE_OUT
!
route-map DEFAULT_ROUTE_OUT permit 10
match ip address DEFAULT
set metric 50
match track 1
!
ip access-list standard DEFAULT
permit 0.0.0.0
On Site A (backup route advertisement):
ip route 0.0.0.0 0.0.0.0 <internet-gateway>
router bgp <ASN>
network 0.0.0.0
neighbor <MPLS-peer> route-map DEFAULT_ROUTE_OUT
!
route-map DEFAULT_ROUTE_OUT permit 10
match ip address DEFAULT
set metric 100
!
ip access-list standard DEFAULT
permit 0.0.0.0
12-06-2024 12:33 AM
@nocitinfra hi,
HTH.
IP SLA for dynamic failure of BGP routes - Cisco Community
12-06-2024 01:25 AM
How we can do it with BGP at remote site? Local Prep or something like that?
12-06-2024 02:04 AM
Use as-path prepend
Make as-path for only prefix 0.0.0.0 long for site-A
MHM
12-09-2024 10:04 PM
Hi MHM,
Can you pls share sample Config templet to achieve this via As-Path?
12-06-2024 02:47 AM
Hello @nocitinfra
Enable auto-failover for default routes at Sites C, D, and E ; you could configure BGP to advertise a primary default route (0.0.0.0/0) from Site B and a backup default route from Site A. This ensures that under normal conditions, Sites C, D, and E use Site B's internet link as the gateway for outgoing traffic, while the route from Site A acts as a fallback.
To achieve this, you can assign a lower BGP metric (MED) or higher local preference to the default route from Site B to make it preferred. Site B's internet link should be monitored using IP SLA with tracking. If the link fails, Site B automatically withdraws its default route, causing Sites C, D, and E to reroute traffic to Site A's internet link via the BGP backup route. This setup ensures dynamic failover without manual intervention while maintaining routing efficiency during normal operation...
---
On Site B (primary route advertisement):
ip sla 1
icmp-echo 8.8.8.8 source-interface <interface-to-internet>
frequency 5
ip sla schedule 1 life forever start-time now
track 1 ip sla 1 reachability
ip route 0.0.0.0 0.0.0.0 <internet-gateway>
router bgp <ASN>
network 0.0.0.0
neighbor <MPLS-peer> route-map DEFAULT_ROUTE_OUT
!
route-map DEFAULT_ROUTE_OUT permit 10
match ip address DEFAULT
set metric 50
match track 1
!
ip access-list standard DEFAULT
permit 0.0.0.0
On Site A (backup route advertisement):
ip route 0.0.0.0 0.0.0.0 <internet-gateway>
router bgp <ASN>
network 0.0.0.0
neighbor <MPLS-peer> route-map DEFAULT_ROUTE_OUT
!
route-map DEFAULT_ROUTE_OUT permit 10
match ip address DEFAULT
set metric 100
!
ip access-list standard DEFAULT
permit 0.0.0.0
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide