How is network traffic routed (VPN vs. ‘open’)

vpn

If my workstation has a VPN connection to a given network (a client's, for instance) and an open connection, what determines how a request for a network resource (e.g. a web page) is routed? Moreover, given that a resource (e.g. google.com) could be available via either route (i.e. VPN or non-VPN), how is this route determined? Is there a way to 'force' the routing to use a given route or the route with lower overhead?

Best Answer

This depends on two things:

  • The default gateway. Is it on the other side of the VPN tunnel, or is it on the clients local LAN.
  • The metric of each connection. This only comes into play if there is two routes to the same site. In the case of Google, it will always be your default route... unless you are google.

The only way to force a route, would be to add a static route to specific network to be through a specific router. Otherwise, your default route/gateway will be used.