cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2141
Views
0
Helpful
9
Replies

BGP Default Route from Multiple Data Centers

patterson_p
Level 1
Level 1

I am trying to get a sense of best practice approach here. Currently have two data centers that are connected to my branch offices via BGP into the ISP network. The plan is to send all default route traffic to one Data Center to get to the internet and use the secondary Data Center as a back up default route in the event communication is lost to the primary Data Center.

 

I do know that you can configure 'default-information originate' if you want to advertise a default route into BGP from a location, but how can I advertise through BGP a less preferred default route from my second Data Center?

 

Thanks a lot for the help!

 

Paul

1 Accepted Solution

Accepted Solutions

Hello

Most simplistic solution would as-prepend on each DC rtrs  injunction with the interface default-originate and prepend on DC2, However depending if you have single/dual branch rtrs and due to the bgp path selection process this could easily be overrode from the bracnh rtrs with with weight or local preference attributes if you need be


DC as-path prepend (assumption is ebgp peering towards branch rtrs)

DC1
router bgp xx
neighbor ( branch1-rtr1) default-originate

DC2
route-map ASPATH 
set as-path prepend asn asn asn

router bgp xx
neighbor ( branch1-rtr2) default-originate route-map ASPATH


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

9 Replies 9

Hello,

 

how are the two data center routers connected ? If you use iBGP, you can just set the local preference. 

 

 

Hello

Most simplistic solution would as-prepend on each DC rtrs  injunction with the interface default-originate and prepend on DC2, However depending if you have single/dual branch rtrs and due to the bgp path selection process this could easily be overrode from the bracnh rtrs with with weight or local preference attributes if you need be


DC as-path prepend (assumption is ebgp peering towards branch rtrs)

DC1
router bgp xx
neighbor ( branch1-rtr1) default-originate

DC2
route-map ASPATH 
set as-path prepend asn asn asn

router bgp xx
neighbor ( branch1-rtr2) default-originate route-map ASPATH


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks!

That actually sounds like a good idea…I’ll try to lab it up. In my setup, I am using a single WAN router at each of the locations (branches and each of the data centers) for this particular ISP.  We are also only running eBGP.  My objective is just the default-route fail over between each of the data centers for my branch location to reach out to the internet.  

Hello


@patterson_p wrote:

Thanks!

That actually sounds like a good idea…I’ll try to lab it up. In my setup, I am using a single WAN router at each of the locations (branches and each of the data centers) for this particular ISP.  We are also only running eBGP.  My objective is just the default-route fail over between each of the data centers for my branch location to reach out to the internet.  


Well your other option would be advertise a default from each DC as stated previously and if then for some reason you needed to change a certain branch office default path then you could use the weight attribute to override the as-apath attribute on that particular  branch rtr  (weight attribute is locally significant) to do so, Or you could not as-prepend at all from the dc rtrs and just use the weight attribute on each branch rtr.

 

example 1 -Branch rtr
router bgp xxx
neigbour <dc 1> weight 50000 <-- highest value preferred
neigbour <dc 2> weight 20000


example 2 -Branch rtr
router bgp xxx
neigbour <dc 1> weight 20000 
neigbour <dc 2> weight 50000<-- highest value preferred


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thank you for the clarification that each branch has a single router and that router is running EBGP with each of the data centers. That is significant information. And in this case I agree with Paul that using the weight parameter on the branch router will allow each branch to identify which data center is preferred and the other data center would be backup. As Paul illustrates it is simple to configure. (and you do not really need to specify a weight for both data centers - it is sufficient to specify an attractive weight on the data center that you want to be preferred)

 

HTH

 

Rick

HTH

Rick

Jon Marshall
Hall of Fame
Hall of Fame

 

Just to clarify as you mention branch sites, this is not an MPLS type WAN is it where you peer with the provider PE devices ? 

 

If your branch sites peer directly with the DC routers using BGP then just ignore me and go with Paul's suggestion. 

 

If your branch routers peers with the providers routers then AS path prepending will work but not weight at the local site. 

 

Jon

Perhaps there is something that I am not understanding correctly. If the branch router has 2 BGP peers, why would assigning weight parameter to one peer not establish a primary/backup relationship between the branch router and the 2 peers? Why would it matter whether the BGP peer was the ISP router or the data center router?

 

HTH

 

Rick

HTH

Rick

 

I can’t see where it specifically says the branch router peers directly with the DC routers or that each branch router has two BGP peerings. 

 

If the branch router only has a peering with the ISP router then weight will not work as all traffic would go to that ISP router as he next hop anyway. 

 

May be wrong but thought it worth pointing out. 

 

Jon

 

There are details about this that we do not know and certainly they impact which alternative would work. My understanding was that the branch router had 2 BGP peers. With 2 peers then using weight would be feasible. @Jon Marshall suggests that there might be just a single peer for the ISP which would then route to the 2 data centers. If that is the case then weight does not work and prepend would be the better solution. So perhaps the original poster can provide some clarification?

 

HTH

 

Rick

HTH

Rick
Review Cisco Networking products for a $25 gift card