Help on choosing network connection

This is for discussing general topics about how to use VirtualBox.
Post Reply
mat1_8
Posts: 4
Joined: 31. Jan 2013, 13:45

Help on choosing network connection

Post by mat1_8 »

Hi,

Currently I am experimenting with PacketFence by using VirtualBox. My setup is like this:

VM 1: Server
VM2: Client (testing purposes)

Both the VM1 and VM2 have IP address 10.0.2.15 since they are configured in NAT mode. Having such network is not vital to my testing since I need to change the way the network works.

What I would like to do is this: Have VM1 (Server) and VM2 (Client) under one virtual network but with different IP addresses and at the same time be able to access the Internet from my physical PC. Also, VM1 needs to act as a DHCP server for VM2. I know that there are Bridged network, Internal network and so on which I can configure but don't know if I can do such implementation.

In other words VM1 and VM2 need to be in their own virtual network (for testing purposes) and at the same time can access the Internet via my physical machine/network. Is this possible please? Thanks
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: Help on choosing network connection

Post by BillG »

Yes, it can be done in several ways.

To communicate with each other and run DHCP you need to put the vms in an internal network. DHCP uses LAN broadcasts so the machines need to be in their own network.

There are several ways to give these machines Internet access. For example you could give them two NICs each, one in the internal network and one using NAT (as at present). You could only give them one NIC (in the internal network) only and run a router in a vm to route this network to the Internet. The router vm would have one NIC in the internal network and one bridged to the physical NIC in the host.
Bill
mat1_8
Posts: 4
Joined: 31. Jan 2013, 13:45

Re: Help on choosing network connection

Post by mat1_8 »

Thanks for your help BillG :D

BillG wrote:Yes, it can be done in several ways.

To communicate with each other and run DHCP you need to put the vms in an internal network. DHCP uses LAN broadcasts so the machines need to be in their own network.

There are several ways to give these machines Internet access. For example you could give them two NICs each, one in the internal network and one using NAT (as at present). You could only give them one NIC (in the internal network) only and run a router in a vm to route this network to the Internet. The router vm would have one NIC in the internal network and one bridged to the physical NIC in the host.
Post Reply