Dual Internet Connections on Windows

This is a quick script I threw together to be able to route specific IP traffic (i.e. a connection to a game server) through my backup internet connection whenever I needed a low latency connection (my main high-bandwidth, high-allowance connection suffers serious congestion during peak times.)

The networks are set up like this:

NIC1 – (default gateway at .1) – default gateway set to (all traffic will go through this connection by default.)
NIC2 – (default gateway at .1) – default gateway NOT set (no traffic will use this connection UNLESS we set up a route for it.)

In the code below, make sure you replace “” with the gateway of your “NIC2”.

@echo off

echo Current Static Routes:
route print | find ""

echo ----------------------------
set choice=
set /p choice=Add New IP Address:

route add %choice% MASK

echo ----------------------------
echo Hit enter to delete the route.

route delete %choice%

Leave a Reply

Your email address will not be published. Required fields are marked *