# Can't ping



## saik0 (Dec 15, 2010)

FreeBSD 8.1 running inside vmware (w7 host).

Getting ping error 
	
	



```
ping: sendto: invalid argument
```
 when pinging certain hosts.

First time i see that message, what is it?


----------



## SirDice (Dec 15, 2010)

Do you have a network interface available in FreeBSD? Have a look with ifconfig(8). Also check if it has a proper IP address.


----------



## phil10 (Dec 16, 2010)

I've had FreeBSD running under VMWare too without any problems.

Do you have a firewall running which may block ping?
Can you browse the web from that machine?


----------



## saik0 (Dec 17, 2010)

Yes it has a proper interface. There's no firewall whatsoever installed.
Compiled the 8.1-STABLE kernel this time. Same problem...

So here's the output:

```
PING 10.0.3.2 (10.0.3.2): 56 data bytes
ping: sendto: Invalid argument
ping: sendto: Invalid argument
ping: sendto: Invalid argument
ping: sendto: Invalid argument

--- 10.0.3.2 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
```

Then i tried to see what happens with _truss ping_
Just a part that seems relevant:

```
gettimeofday({1292557186.552580 },0x0)		 = 0 (0x0)
sendto(2,"\b\0\M^G\M-G\M-n\^[\0\0M\n\M-["...,64,0x0,{ AF_INET 10.0.3.2:0 },0x10) ERR#22 'Invalid argument'
write(2,"ping: ",6)				 ERR#39 'Destination address required'
write(2,": ",2)					 ERR#39 'Destination address required'
stat("/usr/share/nls/C/libc.cat",0xbfbee024)	 ERR#2 'No such file or directory'
stat("/usr/share/nls/libc/C",0xbfbee024)	 ERR#2 'No such file or directory'
stat("/usr/local/share/nls/C/libc.cat",0xbfbee024) ERR#2 'No such file or directory'
stat("/usr/local/share/nls/libc/C",0xbfbee024)	 ERR#2 'No such file or directory'
gettimeofday({1292557186.552997 },0x0)		 = 0 (0x0)
gettimeofday({1292557186.553015 },0x0)		 = 0 (0x0)
select(3,{2},0x0,0x0,{0.999982 })		 = 0 (0x0)
```


----------



## ab (Dec 17, 2010)

Whoa, truss. Big hammer.

Please post what you are actually entering to the console.
your error is defined, but the x factor in ping(x) = error is not stated.

ping has always seemed so reliable to me--and forthright. It is telling you something. So, what did you ask it ?

once we know who x is, your netstat routing in numbers would be helpful.

btw - if your setup is anything like Aaron Martinez reported, you might follow-up with him on a similar issue submitted to questions 20-Nov-2006. This thread appears to be unresolved. Your setups both suggest complications.


----------



## SirDice (Dec 17, 2010)

Please post the output of *ifconfig -a*, *netstat -rn* and the exact ping command you used.


----------

