How can I specify which network to use for internet connection and which for viewing network computers

1

I have two Network Adapters on Windows 7 64 bit operating system which is installed on Oracle Virtual Box.

I created those two adapters as follows:

  1. NAT
  2. VirtualBox Host-Only Ethernet Adapter

If I enable both of these, then this works fine on 2 of 3 systems I work, but on the third one, when I go to the Network, it shows only 2 computers which are:

a. One is it itself.
b. The VBOXSVR

Which shows that, it is getting this using the NAT network adapter which is why it shows only 2, because this is the behaviour of NAT adapter in Virtualbox.

Now, I need to access all three computers on this system, same like all three are accessible on other two computers.

How can I specify on this operating system that it should use NAT adapter for browsing internet and VirtualBox Host-Only Ethernet Adapter for browsing the computers available on network when I goto the Network by clicking on Network on the left pane in Windows Explorer?

teenup

Posted 2014-05-26T10:15:03.240

Reputation: 626

Answers

1

On the guest computer, you can manipulate the routing table to redirect the traffic where you want. On Windows, you specify the internet route like this for example:

route add 0.0.0.0 mask 0.0.0.0 <gateway ip> metric 1

meno

Posted 2014-05-26T10:15:03.240

Reputation: 121

1Can you please explain in detailed steps, how to add this route, and what this metric means, and how it will do what I want. Means, how will this specify that I want to use a particular adapter for internet access and other for network folders exploring? – teenup – 2014-05-26T12:40:28.467

To add this route you just run the command from a command prompt. To view what's in the routing you can run route print. The metric is the "cost of the route", traffic will prefer the route with the lower cost. In your case, you don't have to worry about the metric, just run the command in the answer to specify the "internet route". And another route for your other network, for exemple : route add 192.168.0.0. mask 255.255.255.0 192.168.0.1 metric 1 If you provide me details about each interface, i can give you what to run exactly. – meno – 2014-05-26T18:55:42.143