Page 1 of 1

Ping not working with internal networking, two linux guests

Posted: 18. Jun 2012, 04:42
by AndyVoelkel
Hi,

I'm a newbie both to VirtualBox and Linux Fedora/Ubuntu (I'm trying both). My goal is to explore Eclipse/gcc cross development tools between two VirtualBox Linux boxes before moving to doing the same thing between a Linux guest and real embedded Linux HW (probably a PandaBoard). But I can't seem to get to first base exploring the ecosystem and tools.

As a first step, I'm trying to get two Linux guests two see each other under Internal Networking. I'm using two network adapters in VirtualBox for each guest, one to support NAT (for internet access) and one to support Internal Networking (for inter-guest communication). Both guests' adapters for internal networking are set to the same internal network name.

First I tried to get DHCP working for that internal network using vboxmanage, but didn't seem to work. So I manually assigned network addresses for each guest: 10.0.2.100 and 10.0.2.101. Each guest can ping itself when both guests are running. But neither can ping each other. I read a few posts on this forum where Windows hosts having the same problem, in this case the cause seemed to be that ICMP is not enabled by default in Windows. But although I was not able to easily determine how I enable/disable ICMP for Linux, my google searches didn't seem to indicate that ICMP is disabled for Ubuntu (for Fedora it's not as clear). So if this is true, then why can't I ping my Ubuntu guest from my Fedora guest?

How in tarnation do I debug this problem so that I can get to the next step?

Thanks much in advance for any help!

- Andy

Re: Ping not working with internal networking, two linux gue

Posted: 18. Jun 2012, 11:04
by mpack
Moved to "Linux Guests".

Re: Ping not working with internal networking, two linux gue

Posted: 18. Jun 2012, 14:59
by Perryg
The address range you chose is probably causing the issue. You happened to choose the same range that VBox NAT uses. I would change it to any other octet other than 2 and probably use 10.0.0.* if it were me. Make sure you do not set a gateway in the manual config of both.

You can use wireshark to debug the network but it would need to be installed on the guest/s and not the host has the host is by default outside the guest when using Internal.

Re: Ping not working with internal networking, two linux gue

Posted: 19. Jun 2012, 03:05
by AndyVoelkel
Indeed, that was the problem. I should have spotted it by noticing that the subnet was the same as the other adapter using NAT.

As long as I'm here, I've got another question. Is there one coherent place I could go to learn about network setup for Linux? Even just figuring out how to set static IP addresses by searching google leads to several different approaches, all somewhat poorly explained. Some people recommend ifconfig, some say it is obsolete and say to use ip (which has one of the most confusing man pages I've ever seen), some use GUI tools, but those don't seem to take effect immediately, etc. I'd be happy to read 20 or 30 pages on this to make sure I under the Linux way all the network setup works. I'm perfectly happy to edit configuration files if I know how they work and how to make them "take effect" after editing.

Thanks for your help already and thanks in advance for any more. I'm unstuck now, so it's time to move on to SSH and then to Eclipse!

- Andy

Re: Ping not working with internal networking, two linux gue

Posted: 19. Jun 2012, 03:15
by Perryg
ifconfig and even the gui will work. to make it take effect issue a network restart*.
But your question was where to read. I like the Ubuntu help section and if you really want to learn get a Linux beginners book. They will show you all the commands to make it happen. Most of it is generic across distro, but sometimes you need to tweak it a bit.

*

Code: Select all

# service network restart
OR
# /etc/init.d/network restart