Two Guest Network and Internet connection on Host

Discussions related to using VirtualBox on Linux hosts.
Post Reply
sbrandollo
Posts: 1
Joined: 22. Apr 2009, 04:47
Primary OS: Ubuntu 8.10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian

Two Guest Network and Internet connection on Host

Post by sbrandollo »

Hi All,

I need the guest network between two guests and host, but i want share the host's internet connection with guest network.

I've created the network between guests and host using vboxnet0 interface, in fact if launch ifconfig by host:

Code: Select all

eth1      Link encap:Ethernet  HWaddr 00:13:ce:84:65:02  
          inet indirizzo:192.168.1.105  Bcast:192.168.1.255  Maschera:255.255.255.0
          indirizzo inet6: fe80::213:ceff:fe84:6502/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3448 errors:1 dropped:1 overruns:0 frame:0
          TX packets:2996 errors:0 dropped:5 overruns:0 carrier:0
          collisioni:0 txqueuelen:1000 
          Byte RX:2828671 (2.8 MB)  Byte TX:567947 (567.9 KB)
          Interrupt:17 Memoria:b0101000-b0101fff 

lo        Link encap:Loopback locale  
          inet indirizzo:127.0.0.1  Maschera:255.0.0.0
          indirizzo inet6: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:159 errors:0 dropped:0 overruns:0 frame:0
          TX packets:159 errors:0 dropped:0 overruns:0 carrier:0
          collisioni:0 txqueuelen:0 
          Byte RX:14352 (14.3 KB)  Byte TX:14352 (14.3 KB)

vboxnet0  Link encap:Ethernet  HWaddr 00:76:62:6e:65:74  
          inet indirizzo:192.168.56.1  Bcast:192.168.56.255  Maschera:255.255.255.0
          indirizzo inet6: fe80::276:62ff:fe6e:6574/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisioni:0 txqueuelen:1000 
          Byte RX:0 (0.0 B)  Byte TX:3525 (3.5 KB)
After launching the VirtualMachines (Two guests) they see the host (with ping) and the host see the two guests.
In the host I have an internet connection on device eth1 and want share this connection with two guests, but i want keep the network between guest also.

In the guests are installed Linux Debian (5.01)

Have you any idea for good work?

Thanks a lot

Christian
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Re: Two Guest Network and Internet connection on Host

Post by TerryE »

You need to read the Networking section in the UG. This has changed for 2.2 and a new mode Host Only has been added. This is what you are using. Either switch to bridged network so that your guests scan use a single access path (and virtual NIC) for talking to each other, the host and the internet -- or add a second vNIC to each guest and connect that to a bridged or NAT IF.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Post Reply