Page 1 of 1

Linux network noobie

Posted: 8. Aug 2008, 06:58
by magawake
Hello Everyone:

I have begun to use VirtualBox and I love it, but the network
configuration is very hard for my guests (Debian Linux).

My host OS is Ubuntu with 2 ethernet cards, but I use only 1 wireless
card (eth1). eth0 is disabled because I don't have a wired connection.

My host's eth1 = 192.168.1.2; gw (netgear router): 192.168.1.1


My guests are Debian Linux; I have 4 of them. I would like to setup this:
debianbox0: 10.0.0.2
debianbox1: 10.0.0.3
debianbox2: 10.0.0.3
debianbox3: 10.0.0.3

I would like for these boxes to communicate to each other and the
outside world (internet access). What would be the best way to do
this?

TIA

Posted: 8. Aug 2008, 07:48
by illa
is there a reason you want them on I guess a vlan, Ie the 10.0.0.*.. or would it be better if they were like 192.168.1.3,192.168.1.4,192.168.1.5?

Posted: 8. Aug 2008, 13:12
by magawake
Sure, I suppose I can have them on the same VLAN.

Is that possible? How do I do that? The documentation is really not that clear.

TIA

Posted: 8. Aug 2008, 21:40
by Sasquatch
Ok, internet for the Guests: put the NIC for the Guest on NAT
Internal communication between the Guests: Add a second NIC and set it to Internal Networking, make sure that the intnet name is the same (this is by default, but just check to be sure). Now set a static IP on the Guest systems to eth1 (as this is the Internal Network) and you're good to go. Leave eth0 to DHCP as it's needed for NAT.

Posted: 9. Aug 2008, 01:10
by magawake
well,

My host's eth1 = 192.168.1.2; gw (netgear router): 192.168.1.1


Would that still make sense?

You said leave eth0 for the NAT.

Posted: 9. Aug 2008, 09:10
by Sasquatch
I meant eth0 on the Guest systems. I never mentioned the Host system anywere in my post. You leave the Host as it is, no additional network settings needed, only need to configure the virtual machines.

Posted: 9. Aug 2008, 22:20
by magawake
hmm, is there something like this avaliable ,

http://opensourceexperiments.wordpress. ... ista-host/


This seems to be easy to follow. I guess I can post on a seperate topic for this.

TIA

Posted: 10. Aug 2008, 16:38
by Sasquatch
Your link is one possibility, only it needs more configuration than the method I mentioned, and it works just fine if you use wireless for internet access (bridge and wifi don't mix). As you stated that the VMs have to talk to each other and not particularly the Host system, or the Host to them, using the internal networking option of VB is the best way to go. You will also have better network performance, because you don't need the Host to interact with the network (i.e. access the Host's network devices) leaving more room for your Host to use the network for other things. E.g. if you are copying large files from one VM to an other, the Host system won't be able to download or transfer other large files because the Host network is already heavily used by the VMs. Letting VB handle this will lower the stress on the Host system.

So, use Internal Networking along with NAT (you can even let one VM have NAT and route the other VMs to the NAT VM) if you don't need to have dual communication with Guest and Host.