1

I notice today this behaviour, and it is a weird surprise to me.

linux :

ping host_live : exit code 0
ping host_down : exit code 1
ping host_not_found : exit code 1

windows 7 :

ping host_live : exit code 0
ping host_down : exit code 0
ping host_not_found : exit code 1

( host_not_found : I mean, a hostname not resolveable to IP address )

=== Windows ===

Considering the TcpIp stack and utilities were born under unix and copied from the other vendors / OS, which is the rationale of this different behaviour ?

At the start of my batch scripts, how can I detect if the remote party is down ?

Should I deploy on 1200 clients a custom ping utility ?

Massimo
  • 3,171
  • 3
  • 28
  • 41
  • I did the tests with hosts on the same subnet. Windows : if I ping a host down on a different subnet : exit code 1. This can explain the behaviour. My last two questions are still open. – Massimo Aug 04 '16 at 07:54
  • See: http://stackoverflow.com/questions/9329749/batch-errorlevel-ping-response/13825847 – pah Aug 04 '16 at 10:14
  • 1
    Maybe [this](http://stackoverflow.com/a/27748080/2861476) could help. – MC ND Aug 04 '16 at 11:48

0 Answers0