I am learning about route protocols and I would like to know what is the common approach to handle route conflict between two datacenter.

I have the scenario bellow:


So I want devices on DC1 to communicate with DC3 via VPN1 and devices on DC2 to communicate with DC3 via VPN2.
In case of any VPN failure I want the communication to DC3 be via Link1 -> VPNx.

For example, if VPN2 fail, the communication will be like:
DC2 -> Link1 -> DC1 -> VPN1 -> DC3

if VPN1 fail, the communication will be like:
DC1 -> Link1 -> DC2 -> VPN2 -> DC3

I can advertise DC3 CIDR via BGP, so DC1 and DC2 will know how to route traffic to DC3.
But in this case it will generate a conflict internally between DC1 and DC2 announcements, isn't it?

How to handle this kind of traffic pattern?

2 Answers 2


(Since you're showing "autonomous systems", I'll assume the routing protocol of choice is BGP.)

BGP's primary route selection is AS-PATH length. So DC1 (or DC2) learning DC3 via direct peering would always be the preferred path. Looking at the BGP routes, there would be DC1-DC3 (best) and DC1-DC2-DC3. (and v.v for DC2)

  • Between DC3 and the others it is BGP. But how about between DC1 and DC2? What is the common approach? I understand if it is iBGP it will work as you explained. But how about if it is another routing protocol? Will it have the same behavior?
    – Azize
    Nov 17, 2022 at 22:26
  • 3
    You should generally not use BGP unless it can be fully resolved for the network so your example network needs to use BGP between all the peers or the design is not complete. You can ALSO use an IGP of some kind if DC1 and DC2 are considered to be part of a single organization or network but you still use BGP to help resolve a full BGP route table for the connected networks. Nov 17, 2022 at 23:51
  • Yeah, DC1 and DC2 belongs to the same organization.
    – Azize
    Nov 18, 2022 at 1:35

(Using Cisco default metrics) If using iBGP between DC1 and DC2, route will be installed on routing table using iBGP metric 200, whereas routes received by eBGP metric is 20, achieving the desired result.

If you have any other IGP (RIP, OSPF, etc), you'll need to redistribute BGP into that IGP, but even so, any IGP metric is higher than the eBGP, again achieving the desired result.

  • Thank you. I reproduced it on Packet Tracer using OSPF + eBGP and it worked fine redistributing BGP into OSPF. Unfortunately Packet Tracer doesn't support iBGP.
    – Azize
    Nov 21, 2022 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.