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*