I need to configure split tunnelling with persistent routes for 2 VPN connections on the same computer as the user needs to connect to 2 different corporate servers at the same time. I have a problem though as the VPN interface # varies in some instances and thus the routes are not being used properly and consistently when the VPN connections are established.

Here are the routes I added:

route add -p mask IF 24
route add -p mask IF 23

24 being the VPN interface number for VPN 1, 23 for VPN 2. See below.

C:\Windows\system32>route print
Interface List
 24...........................VPN 1
 23...........................VPN 2
 17...da d1 cb e2 2c ad ......Apple Mobile Device Ethernet
  1...........................Software Loopback Interface 1
 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 13...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
 14...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
 16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3

If I add the routes after connecting to the VPNs then it all works fine but if I disconnect the two VPN connections and then reconnect them in a different order, then the routes are messed up and obviously I can't access the remote networks.

Is there any another way to make the route use a specific interface persistently?


When multiple VPNs connect in random order, their interface IDs change. Therefor the normal ROUTE -P ADD MASK IF 42 does not work. The next time the VPN connects it might have a different interface number.

Powershell has a cmdlet available that adds routes on VPN connection and removes them again when the VPN is disconnected: Add-VpnConnectionRoute. It works without having to specify the interface ID.

The basic syntax is like this:

Add-VpnConnectionRoute -ConnectionName "VPN Connection Name" -DestinationPrefix

After entering this command, the routes will be created/removed automatically on connection/disconnection of the VPN.

|improve this answer|||||
  • I tried PowerShell. It returns the following error: PS C:\WINDOWS\system32> Add-VpnConnectionRoute -ConnectionName "VPN 1" -DestinationPrefix "" Add-VpnConnectionRoute : Invalid parameter DestinationPrefix : The parameter is incorrect. At line:1 char:1 + Add-VpnConnectionRoute -ConnectionName "VPN 1" -DestinationPref ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (VPN 1:root/Microsoft/...ConnectionRoute) [Add-VpnConnectionRoute], CimExceptio n + FullyQualifiedErrorId : WIN32 87,Add-VpnConnectionRoute – Hanuman Mar 14 '16 at 4:49
  • I think the IP range you provided might be invalid: I think it should either be or – ErikvO Mar 15 '16 at 12:01
  • Yeah that was dumb of me. It works now. Thank you. – Hanuman Mar 15 '16 at 13:18
  • how to do in powershell similar as route PRINT? – Tilo Dec 22 '17 at 22:52
  • Ok any reference to "Add-VPNConnectionRoute" in Powershell is Windows 10 only. That command is not supported in Windows 7, so if you're running Windows 7 we're still screwed until someone finds a way.. – user3513074 May 10 '18 at 5:29

And what if you would add router instead and use http://www.cisco.com/c/en/us/support/docs/routers/3600-series-multiservice-platforms/91193-rtr-ipsec-internet-connect.html that way you could do what you want if am correct ?

|improve this answer|||||
  • This is not viable. The VPN connections are made from an off site laptop. – Hanuman Dec 2 '15 at 11:07
  • Anyone else has some suggestions? – Hanuman Dec 14 '15 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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