Jump to content
RESET Forums (homeservershow.com)
Sign in to follow this  
Poppapete

Controlling 2 NICS

Recommended Posts

Poppapete

I have 2 NICS on my DeskTop. One connected to my "everyday router" and the other to my VPN router which VPN's to USA (I am in Australia).

To connect to the VPN to access USA sites that are geoblocked I can:

1. Physically change the Ethernet connection from my computer into the switch OR

2. Leave both connections in and disable the adapter that is not wanted.

I have been using one or the other for a year and am sick of it.

If I leave both connected and fire up a browser then what determines which adapter it uses?

Can I control which adapter it uses?

I have spent all weekend googling this and have not found an answer!

Share this post


Link to post
Share on other sites
schoondoggy

What OS are you running on your desktop?

Many years ago at work the engineers on my team had desktops with two Ethernet ports, one was the companies network, the other was our lab network. In Windows 7 we had them setup two profiles/logins, one to access the company network and one for lab access. This kept the two networks separate and worked fine, but of course it did require logoff and logon. 

Depending on the OS on your desktop, potentially you could run a VM to access the VPN router separately from your other environment.

  • Like 1

Share this post


Link to post
Share on other sites
Poppapete

I am running W10 Creative and have a VM already running which is on the insider program. One of the Nics is used by the VM and could be set to connect to the VPN but that still leaves the 2 Nics operating in the main machine.  How do I control which one is used when I fire up a browser?

If I start a second profile with only one NIC enabled will both be enabled in the first profile when I return and will only one be enabled when I return to the second profile?  Probably!  Only one way to find out. Thank you for your ideas.  Invaluable.

Share this post


Link to post
Share on other sites
ShadowPeo

AFAIK there is no way to do it within a browser, as due to the way it works the browser is not necessarily aware of both NIC's as it operates at a higher OSI/TCPIP layer. 

For example, the browser does not care how the bits are transmitted; it does not need to know how they are, only that they are, in the case of making a connection to a website, the browser just issues a connect request to the TCP/IP stack. This TCP/IP stack is managed by your operating system, which then determines which gateway to use, and issues instructions to the correct NIC.

The question ultimately boils down in your scenario to having multiple gateways; this is what you need to be able to select on the fly, and due to the application not knowing about multiple gateways, as above there is no way I can tell you of making it work. Technically it could be done by using a router and routing tables to tell it which sites go to which connection, but this is overkill and a bitch to maintain.

  • Like 1

Share this post


Link to post
Share on other sites
Poppapete

I have now made sure the NIC that provides the Virtual NIC for the VM is the one connected to the VPN.  So when I fire up netflix in the VM it gives me USA Netflix.  Pass through Audio is working well too.  However when I launch a browser in the real machine it seems to have a 50/50 chance of connecting to the main router.  Interestingly I can IP into either router from the same browser session.

I had thought about setting up a script to turn the nics on and off with if thens else but all to much!!

Share this post


Link to post
Share on other sites
Technogod

Do you have a separate Lab network? I have two routers. One for my main network and one for my Lab network. I have two virtual switches in Hyper-V. One for the lab network and one for the home network. My lab network is on a different subnet  but I can still access it from my main computer. Run the VM on the lab network and use it to connect to your VPN. Here is an excellent class on how to setup a lab router https://www.youtube.com/watch?v=dIFKmJ4wufc

 

Share this post


Link to post
Share on other sites
Poppapete

I think I have it.

I have found that you can change the "Interface Metric" of the IPv4 from Auto to a #.  A lower # (1) will give priority of over #5 which I gave to the second NIC.

Now to see if this NIC is used 100% of the time.

Thanks to the guys at Whirlpool Australia for pointing me in the right direction who also suggested to use a program called ForceBindIP which will bind a program to a specific NIC.

https://www.raymond.cc/blog/bind-windows-application-to-specific-network-adapter-with-forcebindip/

Share this post


Link to post
Share on other sites
Poppapete
3 hours ago, Technogod said:

Do you have a separate Lab network? I have two routers. One for my main network and one for my Lab network. I have two virtual switches in Hyper-V. One for the lab network and one for the home network. My lab network is on a different subnet  but I can still access it from my main computer. Run the VM on the lab network and use it to connect to your VPN. Here is an excellent class on how to setup a lab router https://www.youtube.com/watch?v=dIFKmJ4wufc

 

I do have a separate Lab network. It is the network that connects to the vpn and I do run the VM on that network and that VM is the one that I use to connect to Netflix to bypass geoblocking.  My problem was that when I fired up a browser in my real machine I could not control which network it connected to without physically disconnecting (or disabling) one of the nics. As you see from my previous post I think I have solved my problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  



×
×
  • Create New...