Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two computers host1 and host2. From host1 I can ping Vitrual Machines with IP addresses like 192.168.122.0/24 fine (there is a bridge for the Virtual Machines). But I cannot do that from host2.

Given that both host1 and host2 are part of eth0 and can ping each other fine, do you think there is a way to ping the IPs in 192.168.122.0/24 from host2? How would you go about it?

I thought about adding something similar to this into the routing table "route add -host 192.168.122.11 gw 172.8.30.150 eth0" but It doesn't work.

Thank you for any hints/ideas on this!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

If you are saying that you have two separate computers...one of which is housing VMs. And you can't ping the far vm inside the other host, your gw needs to be the far host...or you also need a route in the router pointing back at the local host and some SRTs to hairpin traffic. If you are bridging, sometimes a bit more is required. To do this, I have previously put eth0 in promisc mode and added it to a bridge group with some tap interfaces. I then use the tap interfaces inside the vm. This can get past a lot of routing/switching weirdness and the eth0 interface disregarding traffic destined for the VM in some instances

share|improve this answer
1  
SRTs = stupid router tricks...they don't hairpin traffic by design –  hbdgaf Nov 26 '10 at 15:40
1  
the VMs shouldn't need routes...i'm trying to get a clearer picture of your layout. was i correct on the two physical hosts and you can't ping vms on the far host from the other computer? –  hbdgaf Nov 26 '10 at 16:11
1  
if it seems like i am being obtuse or obscure i'm not trying to be...i really want to help on this one(when i got started in virtualization it was for dynamips not pertinent why, but i beat my head into a wall for DAYS b/c no one could help) –  hbdgaf Nov 26 '10 at 16:16
1  
okay and you are using bridged networking, nat, what...bridged is preferable, and the eth0 int in promisc mode is required the way i do it –  hbdgaf Nov 26 '10 at 16:36
1  
i would try something like "route add -host 192.168.122.11 gw IP_OF_HOST2 eth0"...still not sure on your addressing scheme. the VMs should be on the same network as the physical machine –  hbdgaf Nov 26 '10 at 16:41
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.