12-23-2021 10:31 AM - edited 12-23-2021 10:42 AM
Hello,
I have two edge routers(R-A and R-B) located in two data centers. Data center A and Data center B. internet service provider router also present at both data center( ISP-A and ISP-B). Data center A is primary location and Data center B is for back up.
R-A and R-B is using ospf to share routes ( we redistribute BGP to ospf at both location ). There is asymetric route issue for data generated from Data center B servers ( going out from R-B , ISP -B). We actually want everything to go and receive via data center A only but not want to shut BGP at data center B.( anything generated from datacenter B should take R-B, R-A and ISP-A path ) ISP is using MED on their side. they put 100 MED on ISP-A and 200 MED on ISP-B router.
For client ip 77.97.0.0/18 receiving below routes on my routers
R-B
B 77.97.0.0/18 [20/200] via ISP-B
R-A
B 77.97.0.0/18 [20/100] via ISP-A
if i shut down bgp at data center B then there is no issue.
Routes when i shut down bgp at data center B
R-B
O E2 77.97.0.0/18 [110/1] via portchannel-x( connected to R-A)
R-A
B 77.97.0.0/18 [20/100] via ISP-A
under ospf i am using below redistribution command
redistribute bgp 10 subnets
under BGP using below redistribution
redistribute ospf 1 match external 1 external 2
Also, we have weight 65000 configured at routemap for 77.97.0.0/18 at data center A
I dont want to shut any BGP connection but want to set routing to prefer R-A to ISP-A when traffic generated from datacenter B location.
I have attached diagram as well.
Thanks,
Nis
12-23-2021 10:47 AM - edited 12-23-2021 10:48 AM
Hi @Mark1110 ,
You can run iBGP between the R-A and R-B and set the local preference higher for the paths received from ISP-A.
Regards,
12-23-2021 11:06 AM
Thank you for your reply Harold. ISP already set MED on their end. ( MED 100 at ISP-A and MED 150 at ISP-B) should i have to put local preference as well?
12-23-2021 11:20 AM
Hi @Mark1110 ,
You don't need to, but I usually prefer not to rely on the ISP for egress decision.
Regards,
12-23-2021 11:38 AM
Thank you Harold. Is there any other way with using ospf as IGP or we have to use ibgp only?
Regards,
Nis
12-23-2021 11:59 AM
Hi @Mark1110 ,
Using iBGP between R-A and R-B is the easiest way to make R-B prefer the internal route (ospf) over the one received via eBGP and to automate the failover.
Regards,
01-21-2022 08:27 AM
@Harold Ritter changes AD can be also a solution ? if i use below distance command at datacenter B router ( R-B ) to change AD for ebgp routes at R-B.
distance 115 neighbor IP 0.0.0.0
12-23-2021 11:05 AM - edited 12-23-2021 11:12 AM
Hello
TBH I dont see any asymmetric routing what you have currently is preferable unless that is you wish to the change routing process? Each wan link is being utilised to the nearest egress point that being the closest ebgp peer and you show resiliency incase of any isp failure, and I assume looking at your topology local prefixes are preferred over the igp (ospf) links also?
12-23-2021 11:10 AM - edited 12-23-2021 11:53 AM
Thank you for your reply Paul. For going outside from my network if traffic generated by servers located at datacenter B ( taking path R-B, ISP-B and for return coming from ISP-A,R-A to R-B ) is there any way to make IGP(ospf) route preferable at datacenter B ( R-B) ?
12-23-2021 12:50 PM
Hello
I would agree with @Harold Ritter changing to an ibgp interconnection would be the best option if you wanted to proceed in changing the current routing, In fact I am presently involved in doing a similar thing for a some of our main sites ( that is migrating from igp to an ibgp solution) as it will be much easier to engineer and administer long term.
12-24-2021 02:26 AM
since the AD of eBGP less than OSPF so Edge-B prefer eBGP always BUT check the feature backdoor.
this make Edge-B prefer the OSPF than the eBGP.
12-24-2021 05:38 AM
Hello
@MHM Cisco World wrote:
since the AD of eBGP less than OSPF so Edge-B prefer eBGP always BUT check the feature backdoor.
this make Edge-B prefer the OSPF than the eBGP.
I have found the backdoor feature is quite restricted, if you have multiple routes then its quite administrative
01-21-2022 08:58 AM
Again freind you can use backdoor this simple solution without change any ad.
01-21-2022 08:57 AM
01-21-2022 09:17 AM
Thank you for your reply @MHM Cisco World . I agree with you but want to know does below also work or not.
if i use below distance command at datacenter B router ( R-B ) to change AD for ebgp routes at R-B.
distance 115 neighbor IP 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