Page 1 of 1

Could not ping linux guest from windows7 host

Posted: 16. Aug 2012, 09:35
by Magesh
HI Team,


I have installed the Linux(Freepbx destro ISO) in Virtualbox configured in windows 7 machine. I am a home user with a laptop not connected to lan or any networks.
My laptop is connected to a datacard to get the internet connection.

1. I am not able to access the freepbx from host(windows 7) browser. With out this i cannot move forward.

2. The ping commands got failed

3. I cannot access the internet from guest os (freepbx destro)

Since i am new to networks and freepbx. I cannot able to trace the issue. I have given the screen shot details of all adaptors and ip address configurations in the below given link. Please go thru it and provide a solution.

https://docs.google.com/document/d/12Xa ... wpyl4/edit

Thanks for your time and consideration

Magesh

Re: Could not ping linux guest from windows7 host

Posted: 16. Aug 2012, 09:57
by mpack
Some details are required of how you configured the VM. In particular I need the network mode you selected.

NAT will not work. If you read up on what NAT is then you will understand that the VM only receives replies to messages it sends. It will not receieve unsolicited messages such as pings.

"Bridged" should work for pings, provided a router is present to hand out dynamic IP addresses (using DHCP function) and thus allow the VM to self configure.

If no router is present, and all that is required is communications between host and guest, then "host only" network mode may work ("host-only" host implements DHCP in this case).

Of course perhaps your entire message is a red herring: perhaps your focus is getting internet to work, rather than getting ping to work: even though the latter is what you asked about. If all you need is a working internet browser in the guest then just enable "NAT" in the guest. In that case if the host has an internet connetion then the guest will have one too. But as mentioned, pinging from the host will do nothing.

I should mention that this is a VM forum, not a networking tutorial forum. There are other sites - and books - which can teach you basic networking concepts. We can help out here with quick questions, but an in-depth discussion of networking would be off topic.

Re: Could not ping linux guest from windows7 host

Posted: 16. Aug 2012, 11:05
by Magesh
Hi mpack,

Thanks for your reply. I learnt the basics about virtualbox networking chapter 6, and then i choose NAT to get internet connection and to connect host and guest i added 'Host Only'. Even after configuring this i can't able to ping between two machine. Even i have given the screenshot of the network configurations in the link.

With Thanks,
Magesh

Re: Could not ping linux guest from windows7 host

Posted: 16. Aug 2012, 12:39
by mpack
I try not to make a habit of clicking unknown links. Screenshots (if useful) can be posted here directly - as attachments.

Your last message has subtly changed the question. Your original message discussed pinging the guest from the host. Pinging in the other direction is a different question. E.g. pinging a Win7 host will usually not work because Win7 disables ICMP (ping) responses by default.

Re: Could not ping linux guest from windows7 host

Posted: 17. Aug 2012, 08:22
by Magesh
Here's what I've done and where I stand at the moment.

Created a fresh VM with freepbx destro, pretty much default all the way(default NAT configured). So far so good. I can able to do yum updates, it is confirmed that internet is connected.
Next I shut the vm down and added another adaptor (Host-only). Started the vm, conifgured eth1( vi /etc/sysconfig/network-scripts/ifcfg-eth1) and assigned an ip of 192.168.156.111, mask 255.255.255.0.

Configured eth1 is as follows

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.156.111
USERCTL=no



I chose that IP address because when I check the adapters running on the host, the vbox adapter shows as this, and it seemed to make sense that the guest OS should have an ip on the same subnet.
Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::9878:bcd3:f0ed:afde%20
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :


After that I restarted the net services(service network restart) and re-tested. Succesfully i can able to open the freepbx link from host (windows 7) :D .The guest was able to ping the web, the host was able to ping the guest. This was a huge leap forward.

With Thanks,
Magesh

Re: Could not ping linux guest from windows7 host

Posted: 17. Aug 2012, 12:04
by mpack
Magesh wrote:Next I shut the vm down and added another adaptor (Host-only). Started the vm, conifgured eth1( vi /etc/sysconfig/network-scripts/ifcfg-eth1) and assigned an ip of 192.168.156.111, mask 255.255.255.0.
Why are you statically assigning IPs? The host only adapter provides a DHCP service, so just let it do its job of serving out IP addresses to VMs on demand. Happily, I expect that the redundant IP assignment is probably being ignored anyway.