Why does my ping command (Windows) results alternate between "timeout" and "network is not reachable"?

Posted by Sopalajo de Arrierez on Super User See other posts from Super User or by Sopalajo de Arrierez
Published on 2014-03-01T12:34:11Z Indexed on 2014/06/05 9:30 UTC
Read the original article Hit count: 162

Filed under:
|
|

My Windows is in Spanish, so I will have to paste console outputs in that language (I think that translating without knowing the exact terms used in english versions could give worse results than leaving it as it appears on screen).
This is the issue: when pinging a non-existent IP from a WinXP-SP3 machine (clean Windows install, just formatted), I get sometimes a "Timeout" result, and sometimes a "network is not reachable" message.
This is the result of:

ping 192.168.210.1
Haciendo ping a 192.168.210.1 con 32 bytes de datos:
Tiempo de espera agotado para esta solicitud.
Respuesta desde 80.58.67.86: Red de destino inaccesible.
Respuesta desde 80.58.67.86: Red de destino inaccesible.
Tiempo de espera agotado para esta solicitud.
Estadísticas de ping para 192.168.210.1:
    Paquetes: enviados = 4, recibidos = 2, perdidos = 2
    (50% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
    Mínimo = 0ms, Máximo = 0ms, Media = 0ms

192.168.210.1 does not exist on the network.
DHCP client is enabled, and the computer gets assigned those network config by the router.
My IP: 192.168.11.2
Netmask: 255.255.255.0
Gateway: 192.168.11.1
DNS: 80.58.0.33/194.224.52.36

This is the output from "route print command":

===========================================================================
Rutas activas:
Destino de red        Máscara de red   Puerta de acceso   Interfaz  Métrica
          0.0.0.0          0.0.0.0     192.168.11.1    192.168.11.2       20
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
     192.168.11.0    255.255.255.0     192.168.11.2    192.168.11.2       20
     192.168.11.2  255.255.255.255        127.0.0.1       127.0.0.1       20
   192.168.11.255  255.255.255.255     192.168.11.2    192.168.11.2       20
        224.0.0.0        240.0.0.0     192.168.11.2    192.168.11.2       20
  255.255.255.255  255.255.255.255     192.168.11.2    192.168.11.2       1
  255.255.255.255  255.255.255.255     192.168.11.2               3       1
Puerta de enlace predeterminada:      192.168.11.1
===========================================================================
Rutas persistentes:
  ninguno

The output of:

ping 1.1.1.1
Haciendo ping a 1.1.1.1 con 32 bytes de datos:
Tiempo de espera agotado para esta solicitud.
Tiempo de espera agotado para esta solicitud.
Tiempo de espera agotado para esta solicitud.
Tiempo de espera agotado para esta solicitud.
Estadísticas de ping para 1.1.1.1:
    Paquetes: enviados = 4, recibidos = 0, perdidos = 4

1.1.1.1 does not exist on the network.
and the output of:

ping 10.1.1.1
Haciendo ping a 10.1.1.1 con 32 bytes de datos:
Respuesta desde 80.58.67.86: Red de destino inaccesible.
Tiempo de espera agotado para esta solicitud.
Tiempo de espera agotado para esta solicitud.
Respuesta desde 80.58.67.86: Red de destino inaccesible.
Estadísticas de ping para 10.1.1.1:
    Paquetes: enviados = 4, recibidos = 2, perdidos = 2
    (50% perdidos),

10.1.1.1 does not exist on the network.
I can do some aproximate translation of what you demand if necessary.
I have another computers in the same network (WinXP-SP3 and Win7-SP1), and they have, too, this problem.
Gateway (Router): Buffalo WHR-HP-GN (official Buffalo firmware, not DD-WRT).

I have some Linux (Debian/Kali) machine in my network, so I tested things on it:

ping 192.168.210.1
PING 192.168.210.1 (192.168.210.1) 56(84) bytes of data.
From 80.58.67.86 icmp_seq=1 Packet filtered
From 80.58.67.86 icmp_seq=2 Packet filtered
From 80.58.67.86 icmp_seq=3 Packet filtered
From 80.58.67.86 icmp_seq=4 Packet filtered

to the non-existing 1.1.1.1 :

ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
^C
--- 1.1.1.1 ping statistics ---
153 packets transmitted, 0 received, 100% packet loss, time 153215ms

(no response after waiting a few minutes).
and the non-existing 10.1.1.1:

ping 10.1.1.1
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
From 80.58.67.86 icmp_seq=20 Packet filtered
From 80.58.67.86 icmp_seq=22 Packet filtered
From 80.58.67.86 icmp_seq=23 Packet filtered
From 80.58.67.86 icmp_seq=24 Packet filtered
From 80.58.67.86 icmp_seq=25 Packet filtered

What is going on here?

I am posing this question mainly for learning purposes, but there is another reason: when all pings are returning "timeout", it creates an %ERRORLEVEL% value of 1, but if there is someone of "Network is not reachable" type, %ERRORLEVEL% goes to 0 (no error), and this could be inappropriate for a shell script (we can not use ping to detect, for example, if the network is down due to loss of contact with the gateway).

© Super User or respective owner

Related posts about networking

Related posts about routing