cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
280
Views
0
Helpful
5
Replies

BGP - Advertised Default Routes from 2 remote sites & Priorities them

nocitinfra
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

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

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

5 Replies 5

@nocitinfra hi,

HTH.

IP SLA for dynamic failure of BGP routes - Cisco Community

Please rate this and mark as solution/answer, if this resolved your issue
Good luck
KB

nocitinfra
Level 1
Level 1

How we can do it with BGP at remote site? Local Prep or something like that?

Use as-path prepend 

Make as-path for only prefix 0.0.0.0 long for site-A

MHM

Hi MHM,
Can you pls share sample Config templet to achieve this via As-Path?

M02@rt37
VIP
VIP

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

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.
Review Cisco Networking for a $25 gift card