Bridged Adapter - Communication between Host and Guest

Discussions about using Linux guests in VirtualBox.
Post Reply
ShadowsVoices
Posts: 5
Joined: 2. Nov 2010, 14:24
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Debian

Bridged Adapter - Communication between Host and Guest

Post by ShadowsVoices »

Hello,

i've got the following Setup

HOST Windows 7 x64
Guest Debian x32
Notebook Windows 7 x64
 Edit: VirtualBox Version: 3.2.10 r66523 

Ive set my VirtualBox to use a "Bridged Adapater" which created the "VirtualBox Host only Network" device.
I then selected my normal Ethernet Card and the VirtualBox Host only Network right clicked and selected "bridge connections".
So far so good.
Ive now got 3 IPS assigned to them:
192.168.178.35 is the bridge itself.
192.168.178.36 is the host os.
192.168.178.40 is the guest os.

192.168.178.50 is my notebook.
192.168.178.1 is my router. (fritz box)
All those IPs are static.
The fritz box acts as DNS server and has an other modem connected to it.

Now the problem is this:
From my Guest OS I can ping anything inside the network, EXCEPT for the Host OS.
As from the Host OS I can ping anything inside the network, EXCEPT the Guest OS.
From my NOTEBOOK I can access both just fine. I can access my SQL server on the Guest OS by just using its it and proper login information. (mysql -h 192.168.178.40 -u root -p)
Internet works just fine from any of the OS's, Guest, Host, Notebook.
I can also ping my router from any OS.

Which means my problem is that the Host OS and Guest OS cannot communicate.
If I try to ping the Guest OS from my Host OS I get the following error message:

Code: Select all

In cmd.exe:
ping 192.168.178.40
Pinging 192.168.178.40 with 32 bytes of data:
Request timed out.
Reply from 192.168.178.35: Destination host unreachable.
Reply from 192.168.178.35: Destination host unreachable.
Reply from 192.168.178.35: Destination host unreachable.
.35 is the Network Bridge in Windows.

Any ideas on how to fix that?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Bridged Adapter - Communication between Host and Guest

Post by vbox4me2 »

ShadowsVoices wrote:Ive set my VirtualBox to use a "Bridged Adapater" which created the "VirtualBox Host only Network" device.
That should not happen, its one or the other.
ShadowsVoices
Posts: 5
Joined: 2. Nov 2010, 14:24
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Debian

Re: Bridged Adapter - Communication between Host and Guest

Post by ShadowsVoices »

okay, so its supposed to be like "bridged adpter" and select my network card there?
ShadowsVoices
Posts: 5
Joined: 2. Nov 2010, 14:24
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Debian

Re: Bridged Adapter - Communication between Host and Guest

Post by ShadowsVoices »

Okay made some progress: im now able to ping from guest to host and host to guest, both still have internet access, are visible and accessable by lan BUT
the host still cannot connect to the guest's mysql server for example, but the notebook can:

logged in from my notebook using the mysql standard client

and this is the output of netstat -tap from my guest
which means that its still a problem with the virtualbox because i can connect to the server from foreign ips, aswell as from the guest itself...

as you can see from netstat -tap | grep mysql the server listens 1x for new connections which is the first line
and the other 4 lines are the connection between
notebook(mysql.exe)<->linuxguest(mysqld)
linuxguest(mysql)<->linuxguest(mysqld)

Code: Select all

in linux shell:
netstat -tap | grep mysql
Proto    Recv-Q    Send-Q    Local Adress    Foreign Address    State    PID/Program name
tcp 0 0 *:mysql *:* listen 1747/mysqld
tcp 0 0 debianserver:mysql Notebook.fritz.:49182 Established 1747/mysqld
tcp 0 0 debianserver:mysql debianserver:56347 Established 1747/mysqld
tcp 0 0 debianserver:56347 debianserver:mysql Established 2241/mysql
tcp 0 0 debianserver:mysql Notebook.fritz.:49181 Established 1747/mysqld
ShadowsVoices
Posts: 5
Joined: 2. Nov 2010, 14:24
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Debian

Re: Bridged Adapter - Communication between Host and Guest

Post by ShadowsVoices »

okay after some more tries ive figured out that i cannot use any services from my host os on my guest os... i can ping it etc but thats all
i however can access everything from my notebook
ShadowsVoices
Posts: 5
Joined: 2. Nov 2010, 14:24
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Debian

Re: Bridged Adapter - Communication between Host and Guest

Post by ShadowsVoices »

okey after spending some hours in my linux shell and windows shells ive now found out what happend: the "virtualbox host-only network" adapter was still configured to take the address 196.168.178.40, however only internaly on my host os... therefor it didnt affect my notebook but my pc because the ip was taken two times => error, error, more error and maybe not even useable output...
ill soon write a good guide and explain where you have to pay special attention...
Post Reply