Page 1 of 1

Guest machine doesn't ping

Posted: 16. Feb 2016, 19:36
by weblogin
I have 2 physical machines in my local network with IP's 192.168.0.1 (Windows 10) and 192.168.0.2 (Windows 10). I installed virtualbox on the machine with IP 192.168.0.1 with Ubuntu OS. Here it's ifconfig:
# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:b7:39:e3
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feb7:39e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1248 errors:0 dropped:0 overruns:0 frame:0
TX packets:1078 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:126318 (126.3 KB) TX bytes:115150 (115.1 KB)

eth1 Link encap:Ethernet HWaddr 08:00:27:dd:7d:81
inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fedd:7d81/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:618 errors:0 dropped:0 overruns:0 frame:0
TX packets:510 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64162 (64.1 KB) TX bytes:151697 (151.6 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:172 errors:0 dropped:0 overruns:0 frame:0
TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:68496 (68.4 KB) TX bytes:68496 (68.4 KB)

Host and Guest machines have access to internet throught Internet router.
Now I successfully ping Virtualhosts Machine 192.168.56.101 from host machine 192.168.0.1 (Windows 10).
But second physical machine 192.168.0.2 (Windows 10) doesn't ping Virtualhosts Machine 192.168.56.101 . I get error
Reply from 87.123.321.23 : Destination net unreachable.

How I can resolve this problem ?

Re: Guest machine doesn't ping

Posted: 16. Feb 2016, 23:53
by BillG
You will need to use bridged mode to have the vm work as if it was another machines on the LAN. At the moment the vm appears to be using host only (which as the name implies, only allows it to see the host on which it runs).

If you set the vm to use bridged mode, It should get a 192.168.0.x address from DHCP in your router and work like another LAN machine.