LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Networking VM (https://www.linuxquestions.org/questions/linux-newbie-8/networking-vm-4175596433/)

edentonjr 12-29-2016 09:07 PM

Networking VM
 
I installed Oracle VM VirtualBox on at laptop, then created 2 VM machines. I configured static IP address on both machines, but when I ping from one box to the onther I get an error message "Destination Host Unreachable" Why is this? Do I need a hub?

linosaurusroot 12-29-2016 11:41 PM

Need more detail - what are the IPs and netmasks? What routes are present? I reckon you don't need a hub for this (how could it help?).

linux4evr5581 12-29-2016 11:57 PM

The Virtualbox documentation explains it. The doc should be in the [help] or [about] options as soon as you open the Virtualbox app. If I recall correctly pinging in Virtualbox VMs is a fairly new feature...

Jjanel 12-30-2016 12:34 AM

I assume you used the NAT default. Try "Bridged". VBox advice from other LQ'ers welcome.
(static routing applies, or guest can dhcp from ISP/router, which often doesn't work for me!)
Yes, per#3, VBox (your host [Win] 'app') Manager F1 -> Help; search 'ping' finds 6.3:
"The disadvantage of NAT mode is that, much like a private network behind a router, the virtual machine is invisible and unreachable from the outside internet; you cannot run a server this way unless you set up port forwarding (described below)." [I hadn't seen 6.3.1! 'too complex' InMyHumble_newbieOpinion:( Simply use Bridged.]
Note that your guests *can* reach the Internet FINE in the default NAT mode. (Exactly like your Win laptop probably does! wiki-research NAT: the world can't reach your RFC1918'ed)
I (personally, because of my 'ISP problem'; others don't! recommend this!) leave eth0/enp0s3 as NAT and *add* a 2nd 'NIC' *as Bridged*. Many distros detect it OK and dhcp eth1/enp0s8 (Plus, you now have the 'fun' of a 2nd net to 'explore'!) bash cmd hint: ip a;ip r

WELCOME (back) to LQ. Enjoy your journey, fast/easy/SAFE with VBox! (ooops, 9yr here)
p.s. I found pre-installed OSboxes give me up&running LinuxS as fast as I can download 'em!

I'm not sure if my answer is correct: my 2 guests (Bridged to host wifi) can't!
internal/host-only? I'm web-researching: virtualbox ping two guests wifi isp
UPDATE: none of the 4 work for me:( (yes, ip a;r 'ok'; Idk tcpdump *inside:eek:* VBoxManager)
UPD2: got 'host-only' to work, BUT must use proper subnet! (WinX: ipconfig/all&netstat -rn [192.168.56 probably])

michaelk 12-30-2016 05:14 AM

As stated it depends on the mode of the VM network adapters. Which mode you pick depends on what you are trying to accomplish. The modes where VMs can communicate with each other is bridged, internal and host only.

https://www.virtualbox.org/manual/ch06.html

edentonjr 12-31-2016 05:01 AM

I was advise by a co-worker to connect my laptop to a switch. That will allow me to network my laptop, therefore my VM will be able to see one another, just because I have them on the same machine doesn't create a network connection.

edentonjr 12-31-2016 05:06 AM

I am also looking into the bridged option. Thanx

edentonjr 12-31-2016 05:24 AM

Problem solved bridging the adapters worked.


All times are GMT -5. The time now is 01:34 AM.