Two different networks

lightenl33t

Reputable
Apr 13, 2015
10
0
4,510
Hello guys, I have two different networks, one is my main one without any limits (named "MEZON") and the other one is the internet from my smartphone (named "Network 3"). I use "Network 3" for playing online games like Counter-Strike, because I have less ping and better connection overall. Also, when I play, I use TeamSpeak and it uses my limited bandwidth. And also, it's annoying to connect phone everytime I want to play. So can I somehow allow to use for example "Network 3" to hl.exe and csgo.exe and other process would use "MEZON"? Maybe there are some solutions with firewall? Let me know, thanks.
 
Solution
Lets take the simple case. I have a ethernet cable hooked to ISP 1 and I get address 192.168.1.99 with a gate of 192.168.1.1. On another ethernet interface I have a cable hooked to ISP2 and I get address 192.168.2.99 with a gate of 192.168.2.1

There are other ways even with a single ethernet but to avoid confusion we will stick with this.

So I want ISP1 to be my main connection and I want only some traffic to go to ISP2.

First do ROUTE PRINT. You should see 2 routes with 0.0.0.0. The PC will select one "best" on but we need to force it.

So you do ROUTE DELETE 0.0.0.0 mask 0.0.0.0 192.168.2.1

Now all traffic will go to ISP1 since it does not know how to get to ISP2.

Now the hard part.
You need to do NSLOOKUP wwww.site.com and...
There is a fairly old program called forcebindip that will let you by program decide which connection to use. I have not used it in years and there were issues getting it to work in windows7 but I would think that was resolved by now.

The other way to do this is with the route command...and this is they way I tend to do it. With this method you send certain internet locations out one connection and let the rest go to your default. The reason this works better sometime than forcebindip is that if say a game has a web browser part and a game server part and both need to use the same connection you end up having to run all your web surfing over the same connection as your game. With the route command you just send all the ip for both the vendor web server and game server out the proper interface and all the programs will use the interface

It does tend to be rather tedious to get all the IP.

Start with a ROUTE PRINT from a cmd prompt launched in admin mode to see.
 

thank you for reply, but can you explain more about second way?
 
Lets take the simple case. I have a ethernet cable hooked to ISP 1 and I get address 192.168.1.99 with a gate of 192.168.1.1. On another ethernet interface I have a cable hooked to ISP2 and I get address 192.168.2.99 with a gate of 192.168.2.1

There are other ways even with a single ethernet but to avoid confusion we will stick with this.

So I want ISP1 to be my main connection and I want only some traffic to go to ISP2.

First do ROUTE PRINT. You should see 2 routes with 0.0.0.0. The PC will select one "best" on but we need to force it.

So you do ROUTE DELETE 0.0.0.0 mask 0.0.0.0 192.168.2.1

Now all traffic will go to ISP1 since it does not know how to get to ISP2.

Now the hard part.
You need to do NSLOOKUP wwww.site.com and find all the ip for the site you want to use ISP2. So lets say you find ip
100.64.55.75 and 100.72.99.127

You enter
ROUTE ADD 100.64.55.75 mask 255.255.255.255 192.168.2.1
ROUTE ADD 100.72.99.127 mask 255.255.255.255 192.168.2.1

So what I have done is said send those to IP to ISP2 router. All the rest still use the 0.0.0.0 route and go to ISP1 router.
 
Solution

thank you! so I can force teamspeak server to my main connection and other stuff will use my phone internet, that would be much easier than getting ips for every server I want to play and there will be some problems with Steam aswell I guess. Thank you a lot!

edit: everything works great, I made .bat and I run it as administrator and it works fine, like I wanted, but how can I restore my main internet route to 0.0.0.0 from 255.255.255.255 without replugging cable?

edit2: my .bat file:
ROUTE DELETE 0.0.0.0 mask 0.0.0.0 192.168.1.1
ROUTE ADD 92.61.46.247 mask 255.255.255.255 192.168.1.1

tried ROUTE DELETE 255.255.255.255 mask 0.0.0.0 192.168.1.1 , but can't get it working

edit3: nevermind, it was easy
ROUTE ADD 0.0.0.0 MASK 0.0.0.0 192.168.1.1
sorry for spamming, but when I connect both internets, I got two default connections, and my computer forces to my phone internet. How can I change priority for my main internet with .bat file, because I'll be too lazy use these ROUTE commands every time, since my phone internet gateway changes every time (I could simply add 255. route for phone internet, right?). If I can do this, then if I connect my phone internet nothing will change, if I use my first.bat, priority goes to my phone internet and my main connects only in TeamSpeak server, and if I do my second.bat, my main internet route goes back to 0.0.0.0 and I would need to get 255. route for my phone internet as well, am I right?
 
You can change the metric with the route command. That is the field on the very end of the screen you see on the route print.

There is a way to change the metric in the nic settings but I forget exactly how.


You can also remove the 0.0.0.0 route by removing the default gateway from the ip setting uder network properties. This would mean you have to be able to use a static ip rather than dhcp which may not be a option.
 

ROUTE ADD 0.0.0.0 MASK 0.0.0.0 192.168.1.1 METRIC 1
should it look smthng like this?
 

can the metric be lower than 10? because 10 is on my phone network and 11 on my main internet, if i do 9 i get 19, if i do 1 i get 11
 


Thank you for all your time and suggestions! Just noticed that my phone gateway doesn't change, so I made two .bat files, maybe someone will need them like an example.

mezon_default.bat
ROUTE DELETE 0.0.0.0 mask 0.0.0.0 192.168.42.129
ROUTE ADD 0.0.0.0 MASK 0.0.0.0 192.168.42.129 METRIC 3
ROUTE ADD 0.0.0.0 MASK 0.0.0.0 192.168.1.1 METRIC 2

mezon_teamspeak.bat
ROUTE DELETE 0.0.0.0 mask 0.0.0.0 192.168.1.1
ROUTE ADD 92.61.46.247 mask 255.255.255.255 192.168.1.1
 

TRENDING THREADS