Unable to ping DNS or IP on WAN

Hello, I'm just getting started with FreeBSD and there's no better way to learn than breaking and fixing a problem. Here's my scenario.

FreeBSD in VMware
Vmware NIC set to bridged
When installing bsdinstall I left all the NIC info blank
LAN: 192.168.96.X
Router: 192.168.96.1

rc.conf looks like this:
Code:
hostname="freebsdvm"
ifconfig_em0="inet 192.168.96.200 netmask 255.255.255.0"
defaultrouter="192.168.96.1"

resolv.conf looks like this:
Code:
nameserver 8.8.8.8

routing restart log:
Code:
delete net ::ffff:0.0.0.0 gateway ::1
delete net ::0.0.0.0 gateway ::1
delete net fe80::: gateway ::1
delete net ff02::: gateway ::1
ifconfig: interface auto does not exist
add net ::ffff:0.0.0.0 gateway ::1
add net ::0.0.0.0 gateway ::1
add net fe80::: gateway ::1
add net ff02::: gateway ::1

I am able to ping LAN IP and LAN DNS names and vice versa. Also able to SSH in.

I CANNOT ping WAN IP or DNS nor can I get any ports to install (must be related to the main problem).

Please help a newcomer.

Thank you in advance
 
Some good details, but "cannot ping" is unspecific. Can't ping ...because the power is off? Because the keyboard is up too high? What does it do? What error is shown?
 
domino said:
Code:
ifconfig: interface auto does not exist
That doesn't look right.

I CANNOT ping WAN IP or DNS nor can I get any ports to install (must be related to the main problem).
This sounds like a problem on the host or your internet router.
 
My apologies.

When I try to ping an IP I get the following:
Code:
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sento: No route to host

When I try to ping a DNS name I get the following:
Code:
PING www-cctld.l.google.com (74.125.226.24): 56 data bytes
ping: sendto: No route to host

On boot up I received this message for the first time after changing my rc.conf and resolv.conf:

Code:
Date freebsdvm sm-mta[1107]: My unqualified host name (freebsdvm) unknown: sleeping for retry

Date freebsdvm sm-msp-queue[1111]: unable to qualify my own domain name (freebsdvm) -- using short name

So it looks like I can resolve the DNS response but unable to complete the ICMP route.
 
Here's the netstat -rn:
Code:
Internet:
Destination:       Gateway      Flags      Refs      Use      Netif      Expire
127.0.0.1          Link#5       Uh          0         0        lo0
192.168.96.0/24    Link#2       U           0         86       em0
192.168.96.200     Link#2       UHS         0         0        lo0
 
SirDice said:
That doesn't look right.


This sounds like a problem on the host or your internet router.

I am able to ICMP and resolve names on all my other VM's (Win boxes) which are on the same host as the FreeBSD vm
 
Are you even able to communicate with your gateway by ping? If so I recommend a traceroute to see how far you are going. Also make sure that you do have a route in place. I do see in the configuration that you have
Code:
defaultrouter="192.168.96.1"
but is it loading properly. I would confirm that your gateway is being loaded because that will not allow you to go anywhere if it is no set.
 
White_Mad_Hatter said:
Are you even able to communicate with your gateway by ping? If so I recommend a traceroute to see how far you are going. Also make sure that you do have a route in place. I do see in the configuration that you have defaultrouter="192.168.96.1" but is it loading properly. I would confirm that your gateway is being loaded because that will not allow you to go anywhere if it is no set.

Traceroute to gateway 192.168.96.1 works, to http://www.google.ca or 8.8.8.8 I receive the following error:
Code:
traceroute: findsaddr: failed to connect to peer for src addr selection
 
What have you got in /etc/rc.conf regarding ifconfig_XXX? No other lines put in by sysinstall originally you forgot to remove?
What is the output of /sbin/ifconfig?

As SirDice said, this:
ifconfig: interface auto does not exist
Does not look right at all.

This VM wasn't copied from anywhere, and you told VMware workstation you moved it? This would cause it to have a duplicate MAC address to another VM.

There's no other machine/VM with a duplicate IP? Can you ping that VM's IP address if it is shut down, from your host?

Are you sure that VMware is bridging to the correct network adapter in your machine? Check in virtual network editor settings that your "auto bridging" adapter (VMnet0) is not trying to bridge to your bluetooth adapter or wireless network, unless this is what you want.

If you run tcpdump in the VM, and ping your gateway from your host machine, do you see the packets in tcpdump (or any other traffic on the host network)?
 
throAU said:
What have you got in /etc/rc.conf regarding ifconfig_XXX? No other lines put in by sysinstall originally you forgot to remove?
What is the output of /sbin/ifconfig?
Code:
em0: flags=8843<UP, BROADCAST, RUNNING, SIMPLEX, MULTICAST> metric 0 mtu 1500
options=9b<RXCSUM, TXCSUM, VLAN_MTU, VLAN_HWTAGGING, VLAN_HWCSUM>
ether 00:0c:29:39:93:06
inet 192.168.96.200 netmask 0xffffff00 braodcast 192.168.96.255
inet6 <skipping...>
nd6 options=29<PERFORMNUD, IFDISABLED, AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
Code:
/etc/rc.conf
hostname="freebsdvm"
ifconfig_em0="inet 192.168.96.200 netmask 255.255.255.0"
#ifconfig_em0="DHCP" <- this didn't work so I rem it
DEFAULTROUTER="192.168.96.1" #I hope this is not case sensitive, since I had to use vi and it reversd all case lettering and I left it
SSHD_ENABLED="yes"
MOUSED_ENABLED="yes"
# Set DUMPDEV TO "auto" to enable crash dumps, "no" TO DISABLE
DUMPDEV="auto"
As SirDice said, this:

Does not look right at all.

This VM wasn't copied from anywhere, and you told VMware workstation you moved it? This would cause it to have a duplicate MAC address to another VM.

No, this is a clean install from the FreeBSD DVD

There's no other machine/VM with a duplicate IP? Can you ping that VM's IP address if it is shut down, from your host?
No... but it will work when it's up... but it doesn't ping freebsdvm, host not found
Are you sure that VMware is bridging to the correct network adapter in your machine? Check in virtual network editor settings that your "auto bridging" adapter (VMnet0) is not trying to bridge to your bluetooth adapter or wireless network, unless this is what you want.
No, it appears to be fine
If you run tcpdump in the VM, and ping your gateway from your host machine, do you see the packets in tcpdump (or any other traffic on the host network)?
Yes, if I ping with the HOST machine (not sure how to ping with TCPDUMP running on the vm at the same time, multiple shells?) I can see the traffic
 
When I added the following, it starts to work:
[cmd=]route add 192.168.96.1[/CMD]

Still not sure why the rc.conf isn't working. I have restarted netif and did a shutdown restart and it doesn't work unless I add it statically.
 
Back
Top