4
2
I currently have two network connections on my laptop:
- A wireless connection to a LAN that is fast and allows internet traffic but not outgoing VPN connections.
- A data dongle that is slow and expensive, but does allow me to make a VPN connection back to my office.
If I connect my VPN when only the data dongle is enabled everything works fine. I can then enable the wireless connection too and all traffic not destined for the VPN goes over the wireless connection.
However, if the VPN connection breaks and I try to reconnect it consistently fails to connect until I disable the wireless connection.
I am getting fed up with constantly having to disable and re-enable the wireless connection to bring back my VPN connection. Is there a way to force the VPN connection to be made only over the data dongle?
UPDATE:
I have tried fiddling with both interface priority and metrics, but the best I could manage was getting ALL traffic to go over the dongle which is no good. Netsh appears to be unreliable on XP and didn't work for me. Devcon (a tool from MS) did work but required a little effort to get the device ID (run "devcon hwids *" and search the output for the connection name). Route also didn't want to work for me.
In the end I put together a batch script using the information in harrymc's answer to stop my wireless, connect to the VPN (using rasdial), and restart the wireless:
devcon disable *DEV_0024*
rasdial <VPN Name> <username> * /domain:<domain>
devcon enable *DEV_0024*
Thanks for this. Unfortunately the dongle was already at the top of the priority list. Changing the metric to 1 on the dongle did work, but it also caused all internet traffic to go over the dongle too :( – Dan – 2012-03-08T09:13:13.007
Manually setting both the wireless connection and the dongle to the same metric doesn't work either, whatever the order in the priority list. – Dan – 2012-03-08T09:22:48.610
I have added more info. – harrymc – 2012-03-08T10:17:20.547
Thanks, it seems that netsh is unreliable on XP so I had to use devcon to cobble something together. I'll add more details to the question later on. – Dan – 2012-03-08T11:40:33.047
Just to be clear, when I said that setting both adapter metrics the same doesn't work, I meant that I couldn't connect to the VPN with that configuration, not that anything new had gone wrong. – Dan – 2012-03-08T12:48:27.067
I saw that you tried the
route
command but try this if you haven't already. Connect to wireless and then connect to the internet with your dongle and determine your current dongle IP address. Next runroute add <VPN IP> MASK 255.255.255.255 <dongleIP>
. Try your VPN connection. If it works, I'll figure out how to get your dongleIP in a script. – Jeremy W – 2012-03-11T03:53:23.050