How to connect two lan conections together and work at same time

Kavin K

Reputable
Sep 6, 2014
1
0
4,510
Hi friends i have a problem i am using two lan ports in one system one port is for local server and the other for internet connection if i disable the server lan connection means the internet works otherwise it wont work the internet connection
 
Solution
You would need to set up a static route so any requests to the servers IP are routed towards that networks router. So for example if your server is 192.168.1.250 and the router on that network 192.168.1.1 with a subnet of 192.168.1.0/24 - you would require something along the lines of.

route -p add 192.168.1.250 mask 255.255.255.0 192.168.1.1


You would also require a second static route for everything else to be defaulted to your internet router. So for example if it was 10.0.0.1

route -p add 0.0.0.0 mask 0.0.0.0 10.0.0.1


I haven't used static routes in a while so I'm a bit rusty and this might be wrong. It's worth doing some revision on Static Routes yourself.
Good place to start -...

casper1973

Distinguished
Dec 30, 2012
942
0
19,360
You would need to set up a static route so any requests to the servers IP are routed towards that networks router. So for example if your server is 192.168.1.250 and the router on that network 192.168.1.1 with a subnet of 192.168.1.0/24 - you would require something along the lines of.

route -p add 192.168.1.250 mask 255.255.255.0 192.168.1.1


You would also require a second static route for everything else to be defaulted to your internet router. So for example if it was 10.0.0.1

route -p add 0.0.0.0 mask 0.0.0.0 10.0.0.1


I haven't used static routes in a while so I'm a bit rusty and this might be wrong. It's worth doing some revision on Static Routes yourself.
Good place to start - http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/route.mspx?mfr=true
 
Solution