1 Public NIC on Host with 2 Public IPs for 2 VM's

Discussions related to using VirtualBox on Windows hosts.
Post Reply
jfuller85
Posts: 2
Joined: 29. Oct 2014, 20:22

1 Public NIC on Host with 2 Public IPs for 2 VM's

Post by jfuller85 »

I apologize in advance if this should go under Windows/Other Guests/ as I can't decipher which part is my problem. If a mod/admin wants to move it, please do.

Host: Windows 7 Pro

Guest 1: Windows 7 Pro
Guest 2: Bomgar

I have a server that has a NIC setup for a public connection that I have assigned two public IP's. I have no problem connecting so two different applications using either IP. Right now I am in the process to move these two applications in their own VM. I tried a couple different ways so that I can have each VM use its own public IP. Is there a way for me to do this without having to get another NIC added to the main server so I can pass the respective IP's to the correct VM?
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: 1 Public NIC on Host with 2 Public IPs for 2 VM's

Post by BillG »

If you give one public IP to each vm, what is the host going to use? Or does it no longer need a public IP?

This is really a networking question rather than a VirtualBox one, and you haven't really told us much about your network config. The only bit that concerns VB is getting the NICs in the vm connected to your LAN, and the way to do that is to use bridged networking so that they can access the network directly through the physical NIC in the host.

From that point on it is a straight forward networking problem. You configure the NICs in the guests just as you would in any other machine connected to the LAN.
Bill
jfuller85
Posts: 2
Joined: 29. Oct 2014, 20:22

Re: 1 Public NIC on Host with 2 Public IPs for 2 VM's

Post by jfuller85 »

The network is pretty standard. The public NIC is set to static and is plugged straight into a hub that is connected to the fiber gateway. I went through the advanced tab in TCP/IP to assign both IPs to the one NIC in the host. The host will need neither IP.

I've bridged the NICS but I can't get the IP assigned within the Guests as I am getting the obvious IP conflict because I assigned it to the Host's NIC.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: 1 Public NIC on Host with 2 Public IPs for 2 VM's

Post by BillG »

Of course they will if you still have those IPs configured on the host NICs.
Bill
Post Reply