Networking in VirtualBox (Host: Win 7, Guest: Debian)

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Peterko
Posts: 9
Joined: 6. Nov 2014, 13:39

Networking in VirtualBox (Host: Win 7, Guest: Debian)

Post by Peterko »

Hello. I need advice with networking.

I have 3 virtual machines with Debian OS. Each virtual OS must be able to connect to the remaining 2. Thus Guest OS must be able to connect to all 3 Guest OS. I also need a static IP address in the Guest OS for maintaining configuration files for Cassandra.

On the Internet I found How to connect Host-Guest OS using NAT and Host-only Network. Unfortunately, I did not work. http://blog.xoundboy.com/?p=586

In VirrtualBox File / Settings / Network - Adapter I set:
IPv4 Address: 192.168.56.1
IPv4 Network Mask

In VirrtualBox File / Settings / Network - DHCP I set DHCP to disable.

Pro each Guest OS, I set the network:
Adapter 1: NAT
Adapter 2: Host-only Adapter

I have only one adapter.


I used reinitialization the MAC Address.

What is meant by Promiscuous Mode? Which should I choose?

The question is, for every Guest OS needs to have a separate "Host-Only Ethernet Adapter", or that should be common for all 3 Guest OS?

In the Guest OS, I set the /etc/network/interfaces according to the instructions http://blog.xoundboy.com/?p=586

Dekuji
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Networking in VirtualBox (Host: Win 7, Guest: Debian)

Post by Perryg »

You need to look at each guest as a separate PC. Each guest will need to be configured with two adapters if you want the Internet in them and for that you use NAT. To allow the guests and host to communicate you do use the host-only adapter and that also need to be selected in each guest. The default settings are shown below.

Host = 192.168.56.1
Guest will be 192.168.56.101 and up if you use the DHCP server but if you want to use static disable the host-only dhcp server in the preference section. Just remember that there is not gateway when using host-only. If you define that the guest will not work properly.
Peterko
Posts: 9
Joined: 6. Nov 2014, 13:39

Re: Networking in VirtualBox (Host: Win 7, Guest: Debian)

Post by Peterko »

Hi,
I do not know if I understand it correctly, so the settings will be:

I create 3 different adapters in the VMs File/Settings/Network

Then I set an Gues OS:
Guest1:
Host-only Adapter#1: 192.168.56.1
Guest IP Address: 192.168.56.101
Guest netmask 255.255.255.0
Guest network 192.168.56.0
Guest broadcast 192.168.56.255

Guest2:
Host-only Adapter#2: 192.168.194.1
Guest IP Address: 192.168.194.101
Guest netmask 255.255.255.0
Guest network 192.168.194.0
Guest broadcast 192.168.194.255

Guest3:
Host-only Adapter#3: 192.168.138.1
Guest IP Address: 192.168.138.101
Guest netmask 255.255.255.0
Guest network 192.168.138.0
Guest broadcast 192.168.138.255

Is this settings good?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Networking in VirtualBox (Host: Win 7, Guest: Debian)

Post by Perryg »

Actually no that is not what i suggested. These settings will put the guests in a different subnet and they will not be able to talk to each other.

Use one host-only network and add all of them to the same network with a different ip address for each guest.

example:
guest 1 = 192.168.56.101 subnet 255.255.255.0
guest 2 = 192.168.56.102 subnet 255.255.255.0

And so on.
Peterko
Posts: 9
Joined: 6. Nov 2014, 13:39

Re: Networking in VirtualBox (Host: Win 7, Guest: Debian)

Post by Peterko »

Thanks
Post Reply