How to set the priority order of IPsec tunnels
When two or more IPsec tunnels of the same VNet reach the same networks, only one of them carries the traffic: the first one in the priority order. The others stand by, and if the first one goes down, the next one in the order carries the traffic. This is how you keep a backup tunnel to a second router of your network.
Which tunnels have an order
The order only exists between tunnels that compete for the same traffic. Two tunnels compete when they are in the same VNet and one local subnet and one remote subnet of one overlap with those of the other. 10.20.0.0/16 and 10.20.1.0/24 overlap, for example. Each set of competing tunnels is a group, with an order of its own. A tunnel that competes with nobody has no position, because the order would make no difference to it.
In Customer Connect → IPsec, the Priority column shows where each tunnel stands:
| What the column shows | What it means |
|---|---|
| #1 of 2, with a star | The preferred tunnel of its group: it carries the traffic. |
| #2 of 2 | A standby tunnel: it carries the traffic if the ones above it go down. |
| No overlap | No other tunnel of the VNet reaches the same networks. |
| Order not set | The tunnel competes with others, but their order was never set. Today the router prefers the most specific network. Set the order as below. |
The details page of the tunnel shows the same position in Priority.

Prerequisites
- Two or more IPsec tunnels of the same VNet that reach the same networks.
- The
customer-connect:ipsec:createpermission.
Change the order
-
Open Customer Connect → IPsec and click Priority order. The IPsec tab of the VNet page has the same button.
-
In the group, move the tunnel with the arrows, or drag it by the handle on the left. The first one in the list is Preferred; the others are Standby.

-
Click Save order.

Saving restarts only the tunnels that need a new priority to stand in the new order, usually one per move. Each one stays a few seconds without traffic while it renegotiates. Tunnels of other groups are not touched.
The order stays as you saved it: reloading the page, editing a tunnel (name, peer, key or proposals) and restarting it do not change it.
New tunnels and groups without an order
- A new tunnel that reaches the networks of a group enters last in that group. Move it up afterwards if it should be the preferred one.
- A group shows Order not set while two or more of its tunnels never got a position, such as tunnels created before the order existed. The dialog shows them by creation date and warns that the order was never set; Save order makes the order shown apply, even if you move nothing, and restarts the tunnels that get a priority.
The order decides which tunnel the VNet uses to send traffic to your network. The traffic coming back follows the preference of your router: set the same preference there, so both directions use the same tunnel.
When the tunnel goes down
With Automatic Reconnection on in the form of the tunnel, the platform tries to bring the tunnel back on its own when it drops.
- If the tunnel stays down for about 2 minutes, the users of the VDC with
customer-connect:ipsec:view,customer-connect:viewornetwork:viewget a bell notification and an e-mail. The e-mail says what the platform tried and what to check on the remote side: whether the equipment is on, whether its firewall lets the tunnel through, whether the internet on that side is working and whether the tunnel settings are the same on both sides. If it stays down, contact support. - When the tunnel is back, they get another notice, with how long it was down.
- A tunnel with Automatic Reconnection off sends no notice. If you turn it off while the tunnel is down, the notice that it is back does not come.