Page 1 of 1

Re: Trying to obtain external IP - [SOLVED]

Posted: 5. Jan 2016, 09:35
by termin8r
Hello, I been at this for some time now and can't seem to get it the way I hoped. I have a windows 7 pc running virtualbox win 7 . I have two nic adapters installed on the main box (host machine). Is it possible to have have the host run on one of the nic cards while the vm box is using the other nic thus resulting in two separate external IPs from the same PC?

Under network settings I had tried using the "bridge adapter" (under adaptor 1) and then selecting my second installed nic, however I couldn't get a connection. Am I missing something here? Can I have both environments (main pc and virtualbox) connected to the internet using their own separate nic cards and have two different external IPs?

Is this not possible?

I'll also add, that I have available five ips through my ISP. Four is being used and the fifth was the one I wanted to see under the VM Virtualbox setup.

Both of the nic cards are enabled under the main pc.... Hopefully somebody reading this will understand and can help on this. I just can't seem to figure out how to make this happen using virtualbox. I sure do appreciate your time. Thanks...

Re: Trying to obtain external IP

Posted: 5. Jan 2016, 11:52
by BillG
That should be possible. I have not done it with public IPs from an ISP but I have done it with private IPs from a local DHCP server.

It really depends on your local network setup. What devices use the other public IPs? Are the five public IP addresses assigned to a local device on a local network? Does each NIC on the host have a connection to this network? If so, it should be fine. It NIC1 gets an IP from this device, setting the vm NIC to be bridged to the second host NIC should see it get its IP from the same device.

You can make sure that the host uses one NIC and the guest uses the other from the network settings in the host OS.

Re: Trying to obtain external IP

Posted: 6. Jan 2016, 03:14
by termin8r
Thanks for the reply. My devices that are using the public IPs are my computers. I have five individual pcs running windows 7. Each one is randomly pulling their own public/external dynamic IP (isp provided).

Rather than have five boxes I wanted to try and consolidate them by using virtualbox. So I disconnected my fifth box thus releasing that IP and added another nic card to box 4. This box 4 is the one that I installed virtualbox on.

You mentioned setting up the host machine to use one nic and the vm to use the second installed nic. That is exactly what I'm trying to achieve. This may be were my trouble is, how do I setup my host machine to only use the specific first nic and have the second nic be used by only the vm? Were in the network settings would I configure or update this?

While on the host machine, I can view both nic card properties and see that they are pulling their own different IPs. I thought the reason to not being able to get an internet connection when bridged under the vm is because that nic is also being made available to the host machine. I would need to disable that second nic on the host and only use it under the vm setup. I'm just not sure how to make this work.


Hopefully you can better understand my setup and offer a helping hand with this.

Re: Trying to obtain external IP

Posted: 6. Jan 2016, 14:22
by scottgus1
termin8r wrote:how do I setup my host machine to only use the specific first nic and have the second nic be used by only the vm? Were in the network settings would I configure or update this?
Open each physical NIC's properties. In the window will be a list of all the "bindings" to that NIC. Bindings are the programs & services that can access the NIC. On the NIC you wish to use just your host on, uncheck all Virtualbox bindings. On the NIC you wish to just use the guest on, uncheck all non-Virtualbox bindings. Reboot the host, just to make sure everything is set correctly. Now your host will only use one NIC and all Virtualbox guests running on that host will only use the other NIC.

Note that if you are using version 5 of Virtualbox, you may need to upgrade, since there was a network glitch that snuck in requiring you to leave the TCP/IP-4 binding still attached to the NIC you want to dedicate to Virtualbox, meaning the host could still get in and use that NIC. This glitch is supposed to be fixed in 5.0.12 (https://www.virtualbox.org/ticket/14578). If you uncheck TCP/IP-4 on the NIC you want Virtualbox to use and that NIC no longer shows up in the Virtualbox GUI for your guest' network settings, then you need the upgrade.

Re: Trying to obtain external IP - [SOLVED]

Posted: 9. Jan 2016, 01:18
by termin8r
Scottgus1; I can't thank you enough, your instructions was dead on. I wasn't aware of those bindings within the network interface setting. I'm not very proficient with vmware and couldn't stop banging my head trying to make this work. I just knew it should be possible but wasn't certain how to achieve this.

I did exactly as you instructed, removing the virtual bindings from the host nic and then removing all other bindings except for the virtual one under the guest nic. And my goodness, that did the trick. Of course I had to do a few reboots for the guest network to resolve the IP, but it sure worked.


I'm soo happy to make this work. I been trying to make this happen for several months now, sure am glad I logged onto this forum and posted my situation. And sure am thankful for that simple solution offered by you.

It's awesome, one box, running two separate windows 7 environments simultaneously and both having their own public IP's.

I'm not sure how to mark this as being resolved but this has been done. I'm all good now. I hope this post will be helpful for someone else that may be trying to achieve this same outcome. Thanks again for your help. :D