# Can’t ping a given ip address, ping hangs

## qdii

Hey,

I have 2 computers which are both connected to the same wifi router. They can both ping websites such as www.wikipedia.org or www.google.com, and can ping each other too, but one of them can ping 188.165.195.37, and the other one can’t. When I say it can’t ping, I mean ping hangs till I kill it.

Both computers have the same route table: http://paste.pocoo.org/show/513378/

I am getting more and more confusedLast edited by qdii on Sun Nov 27, 2011 2:29 pm; edited 1 time in total

----------

## Hu

What if you use ping -c4 188.165.195.37?

----------

## qdii

So what I did was running strace ping on the computer that cannot ping, I ended up with that:

http://paste.pocoo.org/show/513387

```

recvmsg(3, 0x7fffbb30c670, 0)           = -1 EAGAIN (Resource temporarily unavailable) 

```

That line is very surprising, I wonder how that could happen…

EDIT: dug further, the documentation here states that:

 *Quote:*   

> [EAGAIN] or [EWOULDBLOCK]
> 
> The socket's file descriptor is marked O_NONBLOCK and no data is waiting to be received; or MSG_OOB is set and no out-of-band data is available and either the socket's file descriptor is marked O_NONBLOCK or the socket does not support blocking to await out-of-band data.

 

That’s not our case since the third flag is 0, and O_NONBLOCK is defined to be 0x4, 0x80, 0x4000 or 0x200004 depending on the architecture. MSG_OOB is defined to 1. So this looks pretty weird now.Last edited by qdii on Sun Nov 27, 2011 12:55 pm; edited 1 time in total

----------

## qdii

Hu: doesn’t get better with -c4

----------

## Hu

 *qdii wrote:*   

> Hu: doesn’t get better with -c4

 You mean that ping never exits, even with -c4?

----------

## qdii

Sorry, yes it exits with "100% packet loss" when I set -c4

----------

## qdii

I’ve made a little step forward: the same problem strikes up when I connect through an ethernet cable.

----------

## Hu

What is the output of traceroute -I -n 188.165.195.37, as run by both the successful and failed systems?

----------

## qdii

Hey,

thanks for your help. Everything eventually turned out fine after I reseted the router settings. 

No idea what was going wrong

----------

