Split traffic on two ethernet adapters


Recommended Posts

I have two ethernet adapters in computer (WinXP SP2), one (eth1) with internet connection and no connection to LAN and the other (eth2) without internet and connected to LAN.

If I make changes in network config which adapter to be accessed first I get limited access ot to LAN (in case eth1 is primary) or no internet connection (in case eth2 is primary).

I tried to put eth1 as DGW on eth2 but it doesn't work (ICS is not enabled because of domain policy).

Is there any way I could route traffic depending on subnet ie if it's LAN's subnet go to eth2 else eth1.

Thanks.

Link to comment
Share on other sites

your making it more complicated than you think..

ethernet connected to internet 192.168.1.0/24 gateway 192.168.1.1

lan ethernet only (no internet) connection 192.168.2.0/24 gateway NONE!

edit: there is no reason to have to manually use the route command on a setup as simple as this. Now if you had other networks past the one your local nic is connected too.. then yes you would have to setup routes to be able to get there.. But since you only have the 1 local connected network -- there is not need to use the route command. The computer knows what networks its connected to, an knows to use the default gateway if the network is not locally attached.

Link to comment
Share on other sites

your making it more complicated than you think..

ethernet connected to internet 192.168.1.0/24 gateway 192.168.1.1

lan ethernet only (no internet) connection 192.168.2.0/24 gateway NONE!

Thanks Budman, this solution is easy and it works.

I want to ask one more question similar to topic.

What if both NICs have internet (LAN address asigned by DHCP /w DGW)? Ofcourse, I would prefer to use first NIC (no LAN) for internet and second only for LAN.

Link to comment
Share on other sites

An why would it ever be setup like that? Do you have multiple internet connections to use? If not why would you plug 2 interfaces into the same gateway?

I have drawn up many times how to connect multiple internet connections to your network without using a multi interface router. But machines can only ever use 1 at a time, etc. But depending on the metric set for the gateway would determine which one is used. An if the primary one goes done, the secondary one would be used. Some machines on the same local network could use 1 gateway, others the other, etc.. an they would all be connected to the same local network.

Im on the road at the moment -- so no time to dig up the threads.. But if that is what your looking to do???

Please give details of how/why your 2 interfaces would both have internet access -- to the same gateway?, different ones? An I will help you straighten it out -- but it makes no sense to setup your machine like.

Link to comment
Share on other sites

I haven't provided you with enough details, sorry.

NIC1 has access to internet on one router and NIC2 has access to internet on another router (so 2 different gateways).

NIC1 have better internet connection which can not be transfered to router used by NIC2 (and LAN).

NIC2 is configured by DHCP on server /w DGW to router2 (slow internet).

I am doing some testing and I can make NIC2 with static address and no DGW (which is your first solution) and NIC1 will take over internet traffic.

And now situation from my question.... if I put NIC2 to 'Automatic' it will get from DHCP all settings AND DGW to router2. In that case your first solution not working because I have 2 NICs with two GW and we are coming tomy first post on this subject.

Thanks

Link to comment
Share on other sites

Ok -- Like I said, I have been over this a few times. ;)

https://www.neowin.net/forum/index.php?showtopic=599630

https://www.neowin.net/forum/index.php?showtopic=499107

https://www.neowin.net/forum/index.php?showtopic=506771

download.php?file=post-14624-1159362191.gif&name=connectedrouters.gif

What I would suggest is if your 1 connection is faster. That you leave it set for dhcp, then all machines will use that as their gateway. You then set up your secondary router as secondary gateway on the machines with a higher metric than the dhcp router. If router 1 is down, ie can not get to internet -- then machines would auto use router 2.

Or you could just setup machines that you want to use internet 2 as static, an set which internet you want to use.

In this type of setup all machine can use either internet connection - depending on the gateway you set, or the metric set for each gateway, etc. An they are all on the same local network. So you can share files/printers/etc. BTW this only requires 1 nic in each machine.

You could even get fancy an set routes to specific outside servers to use 1 gateway over the other.. For example if you wanted to use the slower internet connection for specifc IRC, IM or FTP servers, or certain websites, etc.. you could just setup routes to those IP/networks using the route command, and use whichever internet connection you want.

let me know if you have more questions.

Link to comment
Share on other sites

there is no reason to do that! The dhcp server will hand itself out as the default gateway.

Unless you have some specific need to route a specific way there is no reason you should ever have to use the route command.

But sure if you want to use the route command to change your default gateway, you can do that.. the netsh interface can also be used, etc. Or just the gui in windows.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.