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'm using VirtualBox on Windows 7 (host) to run a FreeBSD (guest) based web server. I`ve assigned a static ip of 192.168.80. 1 to the (virtualized) NIC which is run in bridged mode. The problem is that when I ping an external server (such as google.com) I get a No route to host error:

dimetro# ping google.com
PING google.com (66.249.90.104): 56 data bytes
ping: sendto: No route to host
...

I can ping the BSD server from both another virtualized machine and my host machine and from the server, I can ping everything on the network. The router ip is 192.168.1.1/16.

ADDENDUM: I have the following lines in /etc/rc.conf on the BSD VM to configure networking:

defaultrouter="192.168.1.1"
ifconfig_em0="inet 192.168.80.1 netmask 255.255.0.0"
share|improve this question
    
What is your IP configuration for the FreeBSD VM? Specifically, what is the default gateway and netmask set to? –  heavyd Mar 2 '10 at 15:06
    
I've edited my question with that info. –  gvkv Mar 2 '10 at 15:45

1 Answer 1

Solved. I didn't add the domain of the BSD VM to /etc/hosts. What I don't understand is why I need to. If I configured the NIC using dhclient, I don't need to specify the host in /etc/hosts.

share|improve this answer
    
I don't see why that should matter, either, for the problem you described. Should you have a similar problem in the future, netstat -rn will display the routing table, which will help with the diagnosis. –  coneslayer Apr 9 '10 at 15:53
    
That's good to know. Thanks. –  gvkv Apr 14 '10 at 11:41
    
dhclient will set the hostname using the response from the dhcp server. –  Majenko Apr 7 '11 at 8:43

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.