Goal and limits
One IPSec tunnel is saturated and you need more aggregate throughput over VPN. The DRG can forward across several IPSec tunnels with equal-cost multipath (ECMP).
Know what it can do first:
- ECMP is off by default and is enabled per DRG route table.
- Maximum width is eight paths.
- Balancing is per flow. The hash uses protocol, source and destination IP, and source and destination port.
- One TCP connection never exceeds the rate of one tunnel.
- Paths are IPSec tunnels or FastConnect virtual circuits, not a mix.
- It uses BGP routes with identical preference.
If the workload is one large database copy over one connection, ECMP will not help. Increase the number of streams or use FastConnect.
Step 1: confirm that a tunnel is the bottleneck
Check per-tunnel traffic:
oci monitoring metric-data summarize-metrics-data \
--compartment-id "$COMPARTMENT" \
--namespace oci_vpn \
--query-text 'BytesSent[5m].sum()' \
--start-time 2026-11-25T08:00:00Z \
--end-time 2026-11-25T12:00:00Z
Convert bytes over five minutes to Mbps: bytes * 8 / 300 / 1000000. Read the sent and received directions separately.
Then test one stream against many from a host behind the CPE:
iperf3 -c 10.20.1.10 -P 1 -t 30
iperf3 -c 10.20.1.10 -P 16 -t 30
If sixteen streams are no faster than one, check the CPE's CPU and encryption throughput, the ISP link, and the tunnel MTU before adding tunnels. If a single stream is slow but parallel streams fill the tunnel, the cause is usually latency and TCP window size.
Step 2: design the tunnels
Each OCI IPSec connection has two tunnels. Four connections give eight tunnels.
| Decision | Recommendation |
|---|---|
| Routing type | BGP on every tunnel in the ECMP group |
| Prefixes | Same prefixes advertised over each tunnel |
| AS path | Same length on each path |
| CPE | At least two devices for redundancy |
| Capacity | Size so that the remaining tunnels carry the peak after a device failure |
With eight tunnels across two CPE devices, losing one device removes half the capacity. Adding tunnels to a single CPE or ISP line increases the number of paths without increasing the real bandwidth.
Don't mix tunnel bandwidth. ECMP does not know that one tunnel goes through a slower line.
Step 3: check BGP on every tunnel
oci network ip-sec-tunnel list --ipsc-id "$IPSEC_OCID" --all \
--query 'data[].{name:"display-name",status:status,routing:routing,bgp:"bgp-session-info"."bgp-state"}' \
--output table
Repeat for each connection. Every member should have status UP, routing BGP and an established BGP session.
Confirm the DRG attachments. drg-attachment list needs an attachment type to include tunnels:
oci network drg-attachment list --compartment-id "$COMPARTMENT" \
--drg-id "$DRG" --attachment-type ALL --all \
--query 'data[].{name:"display-name",id:id,type:"network-details".type,rt:"drg-route-table-id"}' \
--output table
Step 4: enable ECMP on the correct table
The table assigned to an attachment routes traffic that enters the DRG from that attachment. For OCI-to-on-premises traffic, change the table used by the VCN attachments. Changing the table on the tunnel attachments does not balance traffic leaving the VCN.
Save the routes first:
oci network drg-route-table get --drg-route-table-id "$VCN_DRG_RT" > drg-rt-before.json
oci network drg-route-table list-drg-route-rules \
--drg-route-table-id "$VCN_DRG_RT" --all > drg-rules-before.json
Warning
Existing flows may move to another tunnel and take a different return path. Stateful on-premises firewalls that don't share sessions can drop them. Make the change in a maintenance window, after step 5 is ready.
oci network drg-route-table update \
--drg-route-table-id "$VCN_DRG_RT" \
--is-ecmp-enabled true
Verify that the on-premises prefix has several next hops:
oci network drg-route-table list-drg-route-rules \
--drg-route-table-id "$VCN_DRG_RT" --all \
--query 'data[?destination==`10.50.0.0/16`].{next:"next-hop-drg-attachment-id",conflict:"is-conflict",blackhole:"is-blackhole"}' \
--output table
Tunnels that are missing usually have a longer AS path, don't advertise that exact prefix, or aren't covered by the table's import route distribution.
Step 5: enable ECMP on the on-premises side
The DRG setting covers only one direction. Configure the CPE for BGP multipath as well.
FRR example for a router with ASN 65010 and tunnels to OCI. Use the Oracle ASN that your region's documentation gives; the commercial realm commonly uses 31898.
router bgp 65010
neighbor 169.254.10.2 remote-as 31898
neighbor 169.254.11.2 remote-as 31898
address-family ipv4 unicast
network 10.50.0.0/16
neighbor 169.254.10.2 activate
neighbor 169.254.11.2 activate
maximum-paths 8
exit-address-family
The addresses are examples. Keep your existing inbound and outbound prefix filters in place, and make sure that they are identical on all members.
On a Linux router, hash on layer 4 and avoid strict reverse-path filtering:
sudo sysctl -w net.ipv4.fib_multipath_hash_policy=1
sudo sysctl -w net.ipv4.conf.all.rp_filter=2
sysctl net.ipv4.conf.vti1.rp_filter # the higher of all/interface is used
vtysh -c 'show ip bgp 10.20.0.0/16'
ip route show 10.20.0.0/16
ip route should show multiple nexthop entries. Persist the sysctls in /etc/sysctl.d/ after the test.
Step 6: deal with asymmetric paths
OCI and the CPE choose paths independently. A request may arrive on tunnel 3 with its reply on tunnel 6. OCI allows asymmetric routing, but your firewall must handle it.
- One firewall, several tunnels: place the tunnel interfaces in the same zone. Some vendors need an explicit asymmetric-path setting.
- Two firewalls without session sync: don't use ECMP across them. Keep ECMP within one device and use AS-path prepending to make the other device's paths standby.
- Two firewalls with active/active session sync: confirm that the vendor supports asymmetric flows through a cluster.
Prepending is the trade-off. Paths with a longer AS path are left out of the active group, so you gain predictability and lose that device's capacity during normal operation.
Step 7: test balance and failure
Run many flows, since a small number can hash to the same tunnel:
iperf3 -c 10.20.1.10 -P 32 -t 60
iperf3 -c 10.20.1.10 -P 32 -t 60 -R
Perfect distribution isn't expected. Then disable one tunnel on the CPE while a long-lived connection and a synthetic check are running. Record BGP convergence time, lost sessions, and peak utilisation on the remaining tunnels.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| OCI sends on one tunnel only | ECMP set on the wrong DRG table | Enable it on the source attachment's table |
| Only some tunnels are used | Unequal AS path or missing prefix | Align advertisements |
| Inbound balanced, outbound not | Only one side has multipath | Configure both DRG and CPE |
| One tunnel full, others idle | Few flows or one elephant flow | Split the transfer into streams |
| Intermittent resets after enabling | Stateful firewall sees half a session | Fix asymmetry or prepend |
| Small packets work, large ones hang | Tunnel MTU or MSS differs | Use the same MSS clamp on every tunnel |
Roll back
oci network drg-route-table update \
--drg-route-table-id "$VCN_DRG_RT" --is-ecmp-enabled false
Without ECMP the DRG picks one tunnel in a stable but arbitrary way. If you need a specific one, set the AS-path preference before rolling back.
Prevent it next time
- Alarm on each tunnel's state and utilisation, not only on total VPN traffic.
- Alert when an expected path disappears from the route list. Reduced ECMP width is silent.
- Keep N+1 capacity and test a device failure at peak load.
- Manage the ECMP flag and tunnel BGP settings in Terraform.
- Check current tunnel throughput guidance and connection limits before each expansion. If you are close to eight busy paths, plan FastConnect.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get