Question on 2 internet connections

statang

Distinguished
May 6, 2008
20
0
18,510
Hi,
Wonder if the gurus can give me a easy fix (am no expert so please, an idiot’s guide would be helpful )
I have a pc with dual gigabit network on the motherboard (gigabyte x58 ud7) and am running windows 7 ultimate 64bit edition.
I also have 2 internet connections, 1 fiber (which is only able to access local addresses in my country) and 1 cable (for all internet purposes). The cable is connected to a Router DLink-DIR655. And this pc (along with 3 others) are connected to this network as well. Internet runs fine.
Now I want to make use of the fiber connections, only to the pc with 2 network, for gaming within my country, setting dedicated servers and stuff, the fiber would make sense, however due to budget reasons, this internet connection is only limited to the local/country network making it cheaper.
I would only be using this fiber for gaming, setting up gaming dedicated servers, but would not use it for browsing, messenger, and download, simply because most foreign sites are not available through this fiber anyway.
Is there a way to connect both in the windows 7 pc, and somehow only use this specific connections for specific programs? Like combining and stuff?
Thanks
Mark

ps. i tried reviewing the lan faqs. but the link at tomsnetworking seems to be broken.
apologies if somebody else has posted similar but i didn't find it.
 
Solution
Think you got it pretty close with two mistakes: your mask is wrong for your example...

route add 202.0.0.0 mask 255.0.0.0 <Fiber gateway IP>

If you were trying to pick 202.45.x.x then it would have a mask of 255.255.0.0 if that helps :)

Also the last number is the "next hop" not your public IP on your fiber side... essentially it would be the default gateway for the fiber network.

The above settings will not survive a reboot, you can use the -p to make them permanent, but if it were me I think it'd just drop all of them into a txt file, rename it .bat and then use that to add them whenever you wanted to setup this way. You could even put it in the windows registry / run section to have it do it automatically. It's not...

Brian_tii

Distinguished
Feb 9, 2010
292
0
18,810
Interesting question... I think you'd probably want a router that supported multiple "wan interfaces"... which you could then setup your routing to route all IP's for your country to go through the fiber interface and then setup your routers default route to go through the cable. I don't think you'll be able to do this with a consumer level router though... you'll probably need to either build out a linux box with a few NIC's and setup routing / firewalling there, or purchase a more enterprise level router like a Cisco or Juniper.

You maybe able to come up with other creative ways of accomplishing this with some of the more consumer level stuff possibly via QoS settings / some dual wan routers may allow some traffic shaping... but really I kinda think the best way to accomplish what you want would be to indentify all the network ranges in use by your country, and then setup all that traffic to route through the fiber gateway, and point everything else to the cable.
 

statang

Distinguished
May 6, 2008
20
0
18,510
thanks brian,
wow, but unfortunately its like too much for my tiny brain :)
i think i wont be using the fiber to the router per se, as i want to make dedicated servers using the pc directly, without messing around with ip settings in the router. besides, setup routing would just be beyond my ability :(

can i simply make use of the 2 network connections i have in the pc motherboard, one for setting up this game server or some games, and the rest for the ordinary day to day life over the internet which is through the router?



 

Brian_tii

Distinguished
Feb 9, 2010
292
0
18,810


Haha, sorry wasn't trying to confuse you... but I don't think you can do that within Windows or even Linux where a specific application communicates only on a specific interface. Really they send their stuff up to the OS and the OS routes the traffic based on your routing table. Again if you want to do it by IP, and know the IP's that would be "different" then you should be able do something with it. But really the only way I can think of to accomplish anything close to what you're looking for would be with the modifying the routing table either on your local PC (if it has the two connections) or on a router / linux firewall where you have the multiple interfaces and could handle it for multiple systems behind it.

So really... I don't know of an <easy> way of doing what you want to do. You have to get slightly creative for any of the ideas that I have, but it's all I got unfortunately... :-/

Good luck, and if you find a program or something that helps to pull it off let us know. :)

Brian
 

seacliff

Distinguished
Jun 14, 2010
65
0
18,640
I am unsure on how to do that exactly, but I think by routing (under either Win Firewall or network adapter) specific port to one adapter, other ports to the other adapter should be a way in doing so.

You would need some efforts as to find which port your game uses and configure it for all your game, but it should be possible to do that. Hopefully, you won't have any port conflict :) If you do, some apps can let you tweak the default port.

hopefully, it helps a little
 

statang

Distinguished
May 6, 2008
20
0
18,510
thanks.
ok, can you please help me how to set up this routing ?*never done this* before. assuming i know the ports of the say .. cod4 or modern warfare 2 *test*
 

seacliff

Distinguished
Jun 14, 2010
65
0
18,640


As I already said, I am unsure on how to do that. I am not at home nor using window box at the moment.

Getting the game port is the easy part. Just google "gamename port" and you should find it in the few first link.

this link might help you out:
http://www.raymond.cc/blog/archives/2010/03/18/choosing-which-connection-to-use-with-windows-routing-table-editor-gui/
 

tkrl26

Distinguished
Jan 28, 2010
203
0
18,710
If you dont want to spend lots of money you will have to do this with a linux box, with 3 network interfaces. One to the fiber, one to the cable, and one for you internal network. Then you will have to turn the linux box into a router and create IP filter rules... I is a pain in the rear, but after some practice and reading how to after how to it will get easer as time progresses.... Here are a few links to get you started.
http://blog.taragana.com/index.php/archive/how-to-load-balancing-failover-with-dual-multi-wan-adsl-cable-connections-on-linux/
http://ubuntuforums.org/showthread.php?t=119787
http://www.untangle.com/ - you can buy their multi wan balancer.

Best of luck!
 

statang

Distinguished
May 6, 2008
20
0
18,510
am reading those.. *Lol* headache
i think i only need the fiber to run certain applications like making gaming servers and/or some games, and the rest can all be to the cable connection. in this case that means i have 1 default connection, instead of combining 2 internet connections.
I may be wrong but the suggestion on the linux box would be to aggregate the 2 connections (which is not what i want).

i think the routing table would be the best, as for dedicated servers, its easier for the pc to be directly connected to the fiber, rather than using a Router and setting the DMZ.

so now, the help is , can you guys teach me how to
1. set a default internet connection (i connected both to the pc, but i don't know how to make one the default)
2. set the routing table for some sites and or applications (if possible) to go to the fiber route. I hope that this is both upload and download equivalent.

thanks again
perhaps a chat on my msn messenger would be great help. pm me and we can chat :)
 

statang

Distinguished
May 6, 2008
20
0
18,510
hey guys, i'm currently using this method.
connect the 2 networks,
set the fiber as the default by changing the metric lower than the cable
hence the internet will try first the cable, and if fails, will go to the cable.
i think this will work for now, though online games that go out of my country will have an additional latency because it searches from the fiber first.

whats your opinion on this?
 

Brian_tii

Distinguished
Feb 9, 2010
292
0
18,810
Might want to check out this link, it describes how to manually add routes. If you know the ranges that your country uses, you can encompass them into a big net mask to define the ranges.... example you know they use 10.0.0.0 - 10.0.255.255 and your fiber gw is 172.16.1.1 you could run the route add like:

route ADD 10.0.0.0 MASK 255.255.0.0 172.16.1.1

Run this for each range you have, or better yet throw them into a batch file and do it anytime you need it.

http://www.howtogeek.com/howto/windows/adding-a-tcpip-route-to-the-windows-routing-table/
 

statang

Distinguished
May 6, 2008
20
0
18,510
i c, so if my country (indonesia) uses say 202, so would it be
route add 202.0.0.0 mask 255.255.255.0 xxx.xx.x.x (fiber ip)?

then i would do the opposite by setting the cable as the lowest metric, and the fiber the 2nd metric, but add the route add command?

is that correct brian? *MANY THANKS*
also, do i have to do this route every time i restart the pc?
 

Brian_tii

Distinguished
Feb 9, 2010
292
0
18,810
Think you got it pretty close with two mistakes: your mask is wrong for your example...

route add 202.0.0.0 mask 255.0.0.0 <Fiber gateway IP>

If you were trying to pick 202.45.x.x then it would have a mask of 255.255.0.0 if that helps :)

Also the last number is the "next hop" not your public IP on your fiber side... essentially it would be the default gateway for the fiber network.

The above settings will not survive a reboot, you can use the -p to make them permanent, but if it were me I think it'd just drop all of them into a txt file, rename it .bat and then use that to add them whenever you wanted to setup this way. You could even put it in the windows registry / run section to have it do it automatically. It's not impossible to remove the "permanent" ones, just easier if you ever need to clean it up for troubleshooting to reboot and a not run your batch file. Also since some of this stuff may change at times... keeping all the commands in a batch file will allow you to modify it easier, and if you find they change often enough, then you could script the discovery of some of the gateway IP's etc...

Good luck,

Brian
 
Solution