AWS IPSEC on BGP routing (how to control traffic preference for each tunnel?)
Good day guys.
I have the following setup.
- 200F with dual WAN
- 4 tunnels to AWS (the usual IPSEC with 2 tunnels).
- Probably, next year, hopefully, I will have AWS Direct Connect.
Let´s begin with the IPSEC tunnels first:
I´m having issues with the ECMP on the AWS TGW, what I need is just failover between the tunnels, but I want to setup the priority in which they are used under normal conditions, like in the following graph:

I want to influence the traffic (inbound and outbound) so it has the Tunnels in this order of preference:
- Main_Tunnel01
- Main_Tunnel02
- Secondary_Tunnel01
- Secondary_Tunnel02
Or
- Main IPSEC
- Secondary IPSEC
Right now, what I´m having (with ECMP disabled) is that I´m loosing traffic partially if I lose a Tunnel. If I enable ECMP, I get traffic through all the tunnels, and I do not want that.
I found the Technical Tip : Difference between asymmetric routing and auxiliary sessions., I will testing that also, but right now I´m confussed with this AWS documentation:
- https://aws.amazon.com/blogs/networking-and-content-delivery/creating-active-passive-bgp-connections-over-aws-direct-connect/.
- https://repost.aws/knowledge-center/direct-connect-asymmetric-routing
- https://repost.aws/knowledge-center/direct-connect-bgp-communities
IF I understood correctly the AWS docs, I should use:
- Outbound traffic: Local Preference, if not, then I should use AS_Path
- Inbound traffic: Local Preference, if not, MED, if not, then I should use AS_Path
Meaning that I would need two sets of route maps (right?) they would identical in prefix list (my case), but they will differ regarding the Local Preference, MED and AS_Path.
My questions are:
- do I need to setup Local Preference, MED and AS_Path for AWS IPSEC routing inffluencing (all of them, meaning more route maps)?
- or can I use just one of them? meaning, just two route maps, one with more influence than the other,
- if so, which one should I use (Local Preference, MED or AS_Path)???
Keep in mind that I have to leave the space for the future implementation of the Direct Connect, so, whatever I use, I have to leave it so that in case that the Direct Connect fails, the failover SHOULD be Main IPSEC, if the Main IPSEC fails too, then Secondary IPSEC.
Please, I need guidance, oh Wise People of the Community, Help. (FWI: english is my second language, that´s why I´m getting a little confused, sorry about that).
