AWS transit gateway with redundant tunnels¶
Connect a Vipilink network to your Amazon VPCs through an AWS transit gateway, with two IPsec tunnels: one from each of two Vipilink gateways. If one tunnel or gateway goes down, traffic keeps flowing through the other.
BGP runs over both tunnels. The transit gateway learns the Vipilink routes from BGP, so you don't add static routes to it. You still add one static route in your VPC and one in Vipilink.
Before you start
- A Vipilink network with two active gateways. They can be in different regions, for example New Jersey and Miami.
- An Amazon VPC, and permission to create transit gateway and VPN resources.
- The Vipilink network subnet and the VPC CIDR must not overlap.
- AWS charges by the hour for each transit gateway attachment and VPN connection, plus data processing.
For a setup with one gateway, see AWS transit gateway.
How it fits together¶
| Where | What you create | What it does |
|---|---|---|
| AWS | Two customer gateways | Tell AWS the public IPs of your two Vipilink gateways. |
| AWS | Transit gateway and VPC attachment | The hub, and its connection to your VPC. |
| AWS | Two Site-to-Site VPN connections | One per Vipilink gateway. Creating each one also creates its transit gateway attachment. |
| AWS | One VPC route | Sends Vipilink traffic from your VPC to the transit gateway. |
| Vipilink | One dual tunnel and one route | Both tunnels in one step, and a route to the VPC. |
Example used on this page¶
| Item | Example value |
|---|---|
| Vipilink network | Cloud, subnet 10.14.0.0/16 |
| Vipilink gateways | New Jersey and Miami |
| AWS Region | US East (N. Virginia) |
| Amazon VPC | app-vpc, CIDR 10.50.0.0/16 |
| Customer gateways | vipilink-gw-new-jersey, vipilink-gw-miami |
| Transit gateway | vipilink-tgw |
| VPC attachment | tgw-app-vpc |
| Site-to-Site VPN connections | vipilink-vpn-new-jersey, vipilink-vpn-miami |
| VPN attachments | vipilink-tgw-vpn-new-jersey, vipilink-tgw-vpn-miami |
| Vipilink tunnel | AWSTransitHA |
Replace these with your own values.
All the AWS pages used below are in the VPC console, in the left menu under Virtual private network (VPN) and Transit gateways.
Step 1: Create two customer gateways¶
Each customer gateway represents one Vipilink gateway. If you already created them, for example on the AWS virtual private gateway with redundant tunnels page, reuse them and go to Step 2.
- In the Vipilink console, open your network and note the public IP of each gateway.
-
In the AWS console, go to Virtual private network (VPN) → Customer gateways and click Create customer gateway.
-
Create the first customer gateway:
Field Value Name tag vipilink-gw-new-jerseyBGP ASN 64520IP address Public IP of the first Vipilink gateway -
Repeat for the second gateway, for example
vipilink-gw-miami, with BGP ASN64520and the public IP of the second Vipilink gateway.
BGP ASN 64520
Vipilink gateways use ASN 64520. The customer gateways must use the same number, or BGP will not come up.
Step 2: Create a transit gateway and attach your VPC¶
If you already have a transit gateway attached to your VPC, for example from the AWS transit gateway page, reuse it and go to Step 3.
- Create the transit gateway as described in AWS transit gateway, Step 2. Keep VPN ECMP support, Default route table association and Default route table propagation selected.
- Attach your VPC as described in AWS transit gateway, Step 3.
Step 3: Create two Site-to-Site VPN connections¶
Create one VPN connection for each customer gateway. When the target is a transit gateway, AWS also creates the transit gateway attachment for each connection, so you don't create attachments yourself.
-
Go to Virtual private network (VPN) → Site-to-Site VPN connections and click Create VPN connection.
-
Fill in the form:
Field Value Name tag vipilink-vpn-new-jerseyTarget gateway type Transit gateway Transit gateway vipilink-tgwCustomer gateway Existing Customer gateway ID vipilink-gw-new-jerseyRouting options Dynamic (requires BGP) Leave the other fields, including Tunnel 1 options and Tunnel 2 options, at their defaults.
-
Click Create VPN connection.
- Repeat for the second customer gateway, with the name
vipilink-vpn-miamiand the customer gatewayvipilink-gw-miami.
Wait until both connections show Available. This can take a few minutes. The Transit gateway column shows your transit gateway.
Step 4: Name the VPN attachments¶
- Go to Transit gateways → Transit gateway attachments. You see one new attachment of type VPN for each VPN connection. The Resource ID shows which VPN connection it belongs to.
- For each one, point to its empty Name cell, click the pencil icon and enter a name, for example
vipilink-tgw-vpn-new-jerseyandvipilink-tgw-vpn-miami.
Step 5: Download both configuration files¶
-
Go to Virtual private network (VPN) → Site-to-Site VPN connections. Select the first VPN connection (1) and click Download configuration (2).
-
Choose these options and click Download:
Field Value Vendor Generic Platform Generic Software Vendor Agnostic IKE version ikev2 -
Repeat for the second VPN connection. Rename the files so you know which gateway each one belongs to, for example add
_new-jerseyand_miamito the names.
Keep the files private
The configuration files contain the tunnel pre-shared keys. Store them somewhere safe and delete them when you are done.
Step 6: Route VPC traffic to the transit gateway¶
The transit gateway learns the Vipilink routes from BGP once the tunnels are up, so it needs no static route. Your VPC still needs one.
- Go to Virtual private cloud → Route tables (1) and select the route table used by your VPC subnets (2).
-
Open the Routes tab (3) and click Edit routes (4).
-
Click Add route:
- Destination: your Vipilink network subnet, for example
10.14.0.0/16 - Target: Transit Gateway, then choose
vipilink-tgw
- Destination: your Vipilink network subnet, for example
- Click Save changes.
If your VPC subnets use more than one route table, add the route to each of them.
Step 7: Add the dual tunnel in Vipilink¶
-
In the Vipilink console, open your network. On either gateway card, click the ... menu and choose Add Tunnel.
-
Choose IPsec Site-to-Site Tunnel (1) and click Continue. Then choose Dual-Tunnel (2) and click Continue.
Tip
Dual-Tunnel is only available when the network has at least two gateways.
-
Enter a Tunnel Name, for example
AWSTransitHA. Use letters and numbers only, up to 13 characters. Vipilink names the two tunnelsAWSTransitHA 1andAWSTransitHA 2. -
Open the first tunnel section. Click Upload and select the first configuration file. Then make sure Gateway shows the Vipilink gateway that file belongs to.
-
Open the second tunnel section, upload the second file and check Gateway the same way.
Vipilink fills in the pre-shared key, internal IPs, remote public IP, remote AS number and remote ID from each file. To enter them by hand instead, see Enter the tunnel values by hand.
Match each file to its gateway
Each file belongs to the customer gateway of one Vipilink gateway. The Customer Gateway outside IP in the file is the public IP of that Vipilink gateway. If a file is paired with the wrong gateway, that tunnel will not come up.
-
In Shared Settings, keep Vipilink Side Subnets and Remote Side Subnets set to Any. The Vipilink ASN is fixed at
64520. -
Keep the Advanced Settings defaults: IKE V2, IKE lifetime 8h, tunnel lifetime 1h, DPD 10s / 30s, aes256, sha256 and group 14. AWS accepts them.
- Click Add Tunnel. The tunnel cards show Deploying Tunnel with a progress bar until the tunnels are set up.
Enter the tunnel values by hand¶
If you can't upload the files, copy the values from them. Each file has two sections, IPSec Tunnel #1 and IPSec Tunnel #2. Use IPSec Tunnel #1 only. The file calls the AWS side Virtual Private Gateway, even for a transit gateway.
This is the part of the file you need, with the values replaced by placeholders:
IPSec Tunnel #1
================================================================================
#1: Internet Key Exchange Configuration
- Pre-Shared Key : <pre-shared key> [1]
...
#3: Tunnel Interface Configuration
Outside IP Addresses:
- Customer Gateway : <Vipilink gateway public IP> [2]
- Virtual Private Gateway : <AWS tunnel public IP> [3]
Inside IP Addresses
- Customer Gateway : 169.254.70.66/30 [4]
- Virtual Private Gateway : 169.254.70.65/30 [5]
...
#4: Border Gateway Protocol (BGP) Configuration:
- Customer Gateway ASN : 64520
- Virtual Private Gateway ASN : 64512 [6]
| Line in the file | Vipilink field | |
|---|---|---|
| 1 | Pre-Shared Key | Pre-Shared Key |
| 2 | Outside IP Addresses, Customer Gateway | Gateway: choose the Vipilink gateway with this public IP |
| 3 | Outside IP Addresses, Virtual Private Gateway | Remote Public IP and Remote ID |
| 4 | Inside IP Addresses, Customer Gateway | Vipilink Gateway Internal IP, without /30 |
| 5 | Inside IP Addresses, Virtual Private Gateway | Remote Gateway Internal IP, without /30 |
| 6 | Virtual Private Gateway ASN | Remote Gateway AS Number |
Customer Gateway ASN must be 64520, the Vipilink ASN. If it isn't, the customer gateway was created with the wrong ASN. See Step 1.
Do the same with the second file for the second tunnel section.
Step 8: Route Vipilink traffic to the VPC¶
-
On the network card, click the ... menu and choose Route Table.
-
Click Add Routes, choose the dual tunnel, enter the VPC CIDR (for example
10.50.0.0/16) and click Add Routes. If you attached more VPCs to the transit gateway, enter each VPC CIDR. -
The route appears in the table with the type Manual. It covers both tunnels.
Step 9: Check the connection¶
-
In the Vipilink console, both tunnel cards show Up.
-
In the AWS console, open Tunnel details for each VPN connection. Tunnel 1 shows Up, and Details shows the number of BGP routes received.
Tunnel 2 shows Down
This is expected. AWS creates two tunnels for every VPN connection, and each Vipilink gateway uses one of them. AWS also shows a banner saying the connection is not using both tunnels. Redundancy comes from the two VPN connections and the two Vipilink gateways.
-
Go to Transit gateways → Transit gateway route tables, select the route table and open the Routes tab. You see the routes the transit gateway learned from Vipilink, all with the route type Propagated:
- Your Vipilink network subnet (1), through 2 Attachments: both tunnels can carry it.
- Smaller ranges (2), each through one VPN attachment. Each Vipilink gateway announces the ranges that belong to it, so replies to a user go back through the gateway that user is connected to.
If one Vipilink gateway or tunnel goes down, its routes disappear from this table and traffic uses the other tunnel.
-
Connect a device to the network with the Vipilink agent and reach a resource in the VPC, for example with
pingor SSH to a private IP.
Troubleshooting¶
| Problem | What to check |
|---|---|
| A tunnel stays Down | The customer gateway IP matches that Vipilink gateway's public IP. The file uploaded in that tunnel section belongs to that gateway's VPN connection. The customer gateway BGP ASN is 64520. |
| Tunnels are Up but the transit gateway has no Vipilink routes | BGP isn't up. In Tunnel details, Details should show BGP routes. Check the remote AS number and the internal IPs in each tunnel section. |
| Tunnels are Up but nothing responds | The VPC route (Step 6) and the Vipilink route (Step 8) exist. The VPC attachment has a subnet in the Availability Zone of your resource. Security groups and network ACLs in AWS allow traffic from the Vipilink network subnet. Vipilink firewall rules allow the traffic. |
























