Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-29-2016, 10:07 PM   #1
LQ Newbie
Registered: Apr 2009
Posts: 17

Rep: Reputation: 0
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?
Old 12-30-2016, 12:41 AM   #2
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
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?).
Old 12-30-2016, 12:57 AM   #3
Registered: Sep 2016
Location: USA
Posts: 275

Rep: Reputation: Disabled
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...
Old 12-30-2016, 01:34 AM   #4
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
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* VBoxManager)
UPD2: got 'host-only' to work, BUT must use proper subnet! (WinX: ipconfig/all&netstat -rn [192.168.56 probably])

Last edited by Jjanel; 12-30-2016 at 06:33 AM.
Old 12-30-2016, 06:14 AM   #5
Registered: Aug 2002
Posts: 25,500

Rep: Reputation: 5841Reputation: 5841Reputation: 5841Reputation: 5841Reputation: 5841Reputation: 5841Reputation: 5841Reputation: 5841Reputation: 5841Reputation: 5841Reputation: 5841
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.
1 members found this post helpful.
Old 12-31-2016, 06:01 AM   #6
LQ Newbie
Registered: Apr 2009
Posts: 17

Original Poster
Rep: Reputation: 0
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.
Old 12-31-2016, 06:06 AM   #7
LQ Newbie
Registered: Apr 2009
Posts: 17

Original Poster
Rep: Reputation: 0
I am also looking into the bridged option. Thanx
Old 12-31-2016, 06:24 AM   #8
LQ Newbie
Registered: Apr 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Problem solved bridging the adapters worked.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Help Move the Networking Industry Forward at Open Networking Summit 2017 LXer Syndicated Linux News 0 12-13-2016 06:48 AM
LXer: Software Defined Networking Fundamentals Part 1: Intro to Networking Planes LXer Syndicated Linux News 0 11-16-2016 05:43 AM
Permissions on script sudo ln -s ../init.d/start-networking S90start-networking cnolasco Ubuntu 3 04-03-2007 09:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:17 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration