Networking questions, including physical machine into VM network, NAT gateway IP

This is for discussing general topics about how to use VirtualBox.
Post Reply
sluTTY
Posts: 3
Joined: 18. Jun 2016, 11:22

Networking questions, including physical machine into VM network, NAT gateway IP

Post by sluTTY »

I am having problems with setting up the following...

A physical machine (CentOS 7) needs to be setup with the following:

Static IP 192.168.1.222
Gateway and DNS 192.168.1.150
I cannot change these as the box is going to be added to an existing network later and I cannot change the IP setup on the box after installing the applications as well.

The physical machine needs internet access for the application installation.
I need to create a couple of VirtualBoxes (Windows) on the same subnet for testing purposes.

My home subnet is 192.168.178.0

I wanted to create a NAT Network but could not find info on how to change the gateway IP.

Is this even possible?

Thanks
sluTTY
Posts: 3
Joined: 18. Jun 2016, 11:22

Re: Networking questions, including physical machine into VM network, NAT gateway IP

Post by sluTTY »

Well... I'm kind of glad there was no reply within 3 minutes saying it was easy, obvious noob stuff...
Still hoping some expert can help me make it work though.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Networking questions, including physical machine into VM network, NAT gateway IP

Post by BillG »

I fail to see how a NAT network will be of any use when you are talking about a physical machine.

I would be looking to use the host only option to allow the vm guest machines to access the physical host machine. They would not use the 192.168.1 address to access the host. They would use its host only IP (192.168.56.1). What your home network addressing scheme is makes no difference, since the host can use NAT (the default setting) for Internet access.

Is there some strange requirement in the software package which needs the IP to be set before you install the software?
Bill
sluTTY
Posts: 3
Joined: 18. Jun 2016, 11:22

Re: Networking questions, including physical machine into VM network, NAT gateway IP

Post by sluTTY »

Hmmm... I'm afraid I don't get the idea... maybe my explanation was not clear... or maybe this is just a silly idea :?
The physical machine is not hosting the VMs but is a seperate box altogether so host only is not an option, right?
Unfortunately, the IP configuration of the application that will be installed on the physical machine cannot be changed after initial deployment.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Networking questions, including physical machine into VM network, NAT gateway IP

Post by scottgus1 »

Sounds like you need to set up an application on a physical PC with the IP address set up a certain way to match a certain network you don't have access to yet. The IP address setup cannot be changed later due to the application's requirements. You will one day be removing this PC from your network and adding it to the other network for which the special IP address was set.

On another PC you will run some Virtualbox guests which will network to the special application's PC. The PC hosting the Virtualbox guests already has a network with a different IP address range. And you need to maintain this present network setup for the host OS while the guests communicate on the special network setup with the other PC.

There may be ways with virtual lans and all sorts of other network wizardry that BillG knows and I don't. But an easy way if you don't care about spending $20 is to get another physical network adapter card for your Virtualbox host PC. If you use Bridged networking for your guests, you can choose which network card the guests will bridge to. Then you connect the host PC and the special PC via a network cable, and set static IP addresses in the guests. Now the guests and special PC can communicate via the private network using IP addresses, and the host PC can still get internet and your present network's services.

Only one thing not figured out yet: Is internet access required for the entire application installation and setup, including the IP address settings? (If so you'll have to change your present network setup to match the required IP address range before the application starts installing, I'd think.) On the other hand, if internet is needed only to download the installer, just download the installer and get it on the PC, then change the static IP address of the special PC to the required settings and network the PC to the Bridged network card for the guests.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Networking questions, including physical machine into VM network, NAT gateway IP

Post by BillG »

If the vms are hosted on a different PC, they will need to run in bridged mode linked to a physical NIC which is in the same network (and the same IP subnet) as the test physical machine.

Like scottgus1, I can't see why the installation of the software is locked to a particular IP address. Why can't you install the software and test it using an IP in your home network IP subnet, then change its IP config before you deploy it somewhere else?
Bill
Post Reply