LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Cannot ping host from guest (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/cannot-ping-host-from-guest-803178/)

cucolin@ 04-25-2010 09:56 PM

I also noticed VMnet8 is 192.168.239.1 NOT VMnet1. You were referring to it:
Quote:

Your Windows host already has an internal vmnet adapter (vmnet1) that has the address 192.168.239.1. You want to connect with THAT adapter.
i assigned eth1 to 192.168.248.101 (VMnet1). The linux server does NOT goes down this time, but I can't still ping the host.
i tried ping 192.168.248.1 and got:
Quote:

PING 192.168.248.1 (192.168.248.1) 56(84) bytes of data.
From 67.217.175.6 icmp_seq=1 Time to live exceeded
From 67.217.175.6 icmp_seq=2 Time to live exceeded
From 67.217.175.6 icmp_seq=3 Time to live exceeded
i configured eth1 the following:
Quote:

iface eth1 inet static
address 192.168.248.101
netmask 255.255.255.0
gateway 192.168.248.1
i also tried without the gateway and still same results. I don't know what else to do! i appreciate your help on this one....

jiml8 04-26-2010 08:35 PM

Quote:

when i do the configuration below, i lose all connections to the linux box:

Quote:
iface eth1 inet static
address 192.168.239.101
netmask 255.255.255.0
gateway 192.168.239.1
The problem is in your routing table on the Linux guest.

I don't think you should be specifying gateway here because when you do that you are specifying the route to take when the packet destination address doesn't match any local addresses. Thus, you are routing your internet responses to vmnet1 in your Windows host...and it doesn't know what to do with them so it drops them.

leave your gateway specified as your guest system's internet address...the 208 dot something address.

When you have done that, if you can't talk between the guest and the host, you need to add a line to the routing table in the linux guest:
Code:

route add -net 192.168.239.0 -netmask 255.255.255.0 dev eth1
Now, you probably can ping from your host to your guest with the setup as you have it here. But if you can't, then you need to add an entry to the routing table in your Windows host:

Code:

route add 192.168.239.0 mask 255.255.255.0 192.168.239.1

cucolin@ 04-26-2010 09:56 PM

192.168.248.101 (VMnet1) is the one not 192.168.239.1 (VMnet8).
know i can ping the host and the host can ping the guest without doing any routing. I think this issue is almost solved, i just need to test accessing the win sql database and shares from win and linux (ubuntu 9.10). I will keep you posted and post a final solution. I appreciate your help!

Quote:

from linux guest:
PING 192.168.248.1 (192.168.248.1) 56(84) bytes of data.
64 bytes from 192.168.248.1: icmp_seq=1 ttl=128 time=2.71 ms
64 bytes from 192.168.248.1: icmp_seq=2 ttl=128 time=0.147 ms
64 bytes from 192.168.248.1: icmp_seq=3 ttl=128 time=0.141 ms

from win server 2003 host:
Pinging 192.168.248.101 with 32 bytes of data:

Reply from 192.168.248.101: bytes=32 time<1ms TTL=64
Reply from 192.168.248.101: bytes=32 time<1ms TTL=64
Reply from 192.168.248.101: bytes=32 time<1ms TTL=64
Reply from 192.168.248.101: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.248.101:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

jiml8 04-26-2010 10:13 PM

OK. I got mixed up on which subnet address was vmnet1. Default VMWare setup is usually host only on vmnet1, so the 248 address range is certainly the address range you want.

If you are pinging both ways, you're good to go.

jiml8 05-07-2010 04:52 PM

Well, I haven't heard back. I presume that means he got it working.

cucolin@ 05-07-2010 11:25 PM

Yes, it works! Hopefully this post can help someone else. Now I'm able to connect to the SQL database at the host from linux and also ssh and ftp to the linux box from the host(win server 2003)

Thanks for your help!!!


All times are GMT -5. The time now is 08:04 PM.