Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

From a windows 7 machine, I ping a non existing ip address.

C:>ping 192.168.1.222

Pinging 192.168.1.222 with 32 bytes of data:

Reply from 192.168.1.222: Destination host unreachable.

Reply from 192.168.1.222: Destination host unreachable.

Reply from 192.168.1.222: Destination host unreachable.

Ping statistics for 192.168.1.222: Packets: Sent = 3, Received = 3, Lost = 0 (0% loss)

Even though there is no reply, the errorlevel is set to 0.

*what I am trying to do, is figure out if a remote machine is replying to ping. One of my test is to turn off the machine and ping it. For some reason, ping sets errorlevel to 0 *

share|improve this question

closed as off topic by Iain Mar 29 '12 at 7:20

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Ping completed successfully. You asked it to ping an IP address, and it did it. The fact that no replies were received does not mean that the ping didn't work. –  Adam Thompson Mar 23 '12 at 11:27
    
It behaved differently in win XP –  Doron Mar 28 '12 at 5:27
    
See superuser.com/questions/403905/… –  Iain Mar 29 '12 at 7:19

1 Answer 1

You can pipe the output of the ping command through find to see if the ping had a reply: http://www.tek-tips.com/viewthread.cfm?qid=304609

share|improve this answer

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