How can ping know if my host is downHow does ping know that my packets are filtered?Max ping response time?How can I set a short timeout with the ping command?Ping a Specific PortAndroid/Linux Ping sends another packet before packet timeoutDifference between ping time and time for first ACK answerSending Ping at fixed packet size as jumbo frame is not working in linuxCan't get an nping response through an Alcatel modem - but can get pingCheck a machine's up or down status without using pingPing packet loss even though the target is reachable. Does this mean packets are eventually getting through?

Can the discrete variable be a negative number?

Why are there no referendums in the US?

Pre-amplifier input protection

Why not increase contact surface when reentering the atmosphere?

Go Pregnant or Go Home

What happens if you roll doubles 3 times then land on "Go to jail?"

Is exact Kanji stroke length important?

What can we do to stop prior company from asking us questions?

Two monoidal structures and copowering

Opposite of a diet

Failed to fetch jessie backports repository

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

Is there a korbon needed for conversion?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races

How to safely derail a train during transit?

Valid Badminton Score?

How do I go from 300 unfinished/half written blog posts, to published posts?

Efficient way to transport a Stargate

How can I kill an app using Terminal?

Did Dumbledore lie to Harry about how long he had James Potter's invisibility cloak when he was examining it? If so, why?

Do sorcerers' Subtle Spells require a skill check to be unseen?

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

What does "I’d sit this one out, Cap," imply or mean in the context?

What is the best translation for "slot" in the context of multiplayer video games?



How can ping know if my host is down


How does ping know that my packets are filtered?Max ping response time?How can I set a short timeout with the ping command?Ping a Specific PortAndroid/Linux Ping sends another packet before packet timeoutDifference between ping time and time for first ACK answerSending Ping at fixed packet size as jumbo frame is not working in linuxCan't get an nping response through an Alcatel modem - but can get pingCheck a machine's up or down status without using pingPing packet loss even though the target is reachable. Does this mean packets are eventually getting through?













11















When I ping a server there are two kinds of result I might get:



  • Timeout

  • Host is down message

How does the ping command know if a host is down? In both cases, the host does not send any response to the ping packet, so how can ping tell the difference?










share|improve this question




























    11















    When I ping a server there are two kinds of result I might get:



    • Timeout

    • Host is down message

    How does the ping command know if a host is down? In both cases, the host does not send any response to the ping packet, so how can ping tell the difference?










    share|improve this question


























      11












      11








      11


      2






      When I ping a server there are two kinds of result I might get:



      • Timeout

      • Host is down message

      How does the ping command know if a host is down? In both cases, the host does not send any response to the ping packet, so how can ping tell the difference?










      share|improve this question
















      When I ping a server there are two kinds of result I might get:



      • Timeout

      • Host is down message

      How does the ping command know if a host is down? In both cases, the host does not send any response to the ping packet, so how can ping tell the difference?







      ping






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 21 at 13:11









      Mark Amery

      2951219




      2951219










      asked Mar 21 at 8:59









      Bob5421Bob5421

      17117




      17117




















          3 Answers
          3






          active

          oldest

          votes


















          2














          Host is down message:



          This indicates that you don't know a route to the desired destination, or a remote router reports that it has no route to the destination.



          Timeout:



          Indicates the absense of Echo Reply messages. No package were received within the default time.






          share|improve this answer








          New contributor




          SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.



























            21














            Differences between responses are not actually determined by ICMP itself but rather indirectly.



            ICMP can distingush between the following:



             0 = net unreachable;

            1 = host unreachable;

            2 = protocol unreachable;

            3 = port unreachable;

            4 = fragmentation needed and DF set;

            5 = source route failed.


            But it does so with other network resources. Codes 0, 1, 4, and 5 may be received from a gateway. Codes 2 and 3 may be received from a host.



            If, according to the information in the gateway's routing tables, destination network is unreachable, (e.g., the distance to the network is infinity), the gateway may send a destination unreachable message to the internet source host of the datagram. In addition, in some networks, the gateway may be able to determine if the internet destination host is unreachable. It is the Gateways in these networks that can send destination unreachable messages to the source host when the destination host is unreachable, so it's not actually ICMP doing the determinations.



            In the case that in the destination host, the IP module cannot deliver the datagram because the indicated protocol module or process port is not active, then the destination host may send a 'destination unreachable' message to the source host.



            Finally, if a datagram must be fragmented to be forwarded by a gateway yet the 'Do not Fragment' flag is on, the gateway will discard the datagram and will return a 'destination unreachable' message.



            Now to difference between the 2 separate cases: Request Timed Out means that no Echo Reply messages were received within the set time. This can be due to many different causes: ARP request failure, network congestion, packet filtering, routing error, or a even silent discard.



            When you get a Reply From [IP address]: 'Destination Host Unreachable,' then the problem occurred at/after a remote router, whose address is indicated by the [IP address]. So it's a router telling you that there is a problem between it and the destination address.






            share|improve this answer


















            • 3





              no router or other device needs to be involved. Both Windows and Linux produce "host unreachable" if the host is in a local subnet and there is no ARP entry.

              – Oh My Goodness
              Mar 21 at 15:53











            • If a host is unreachable it cannot produce a receivable-by-initiator answer.

              – Overmind
              Mar 22 at 7:25











            • The pinging host produces the message. Obviously the destination cannot.

              – Oh My Goodness
              Mar 22 at 7:34











            • That comes form the gateway.

              – Overmind
              Mar 22 at 7:40











            • No. "Gateway" is a layer 3 construct. There is no routing, and thus no gateway involved at all when pinging a host on the local subnet.

              – Oh My Goodness
              Mar 22 at 7:53


















            -3














            You cant ping if the computer isnt connected to the internet because by pinging you actually request the ip of the host .






            share|improve this answer








            New contributor




            Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.



















              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "2"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f959259%2fhow-can-ping-know-if-my-host-is-down%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              Host is down message:



              This indicates that you don't know a route to the desired destination, or a remote router reports that it has no route to the destination.



              Timeout:



              Indicates the absense of Echo Reply messages. No package were received within the default time.






              share|improve this answer








              New contributor




              SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.
























                2














                Host is down message:



                This indicates that you don't know a route to the desired destination, or a remote router reports that it has no route to the destination.



                Timeout:



                Indicates the absense of Echo Reply messages. No package were received within the default time.






                share|improve this answer








                New contributor




                SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                  2












                  2








                  2







                  Host is down message:



                  This indicates that you don't know a route to the desired destination, or a remote router reports that it has no route to the destination.



                  Timeout:



                  Indicates the absense of Echo Reply messages. No package were received within the default time.






                  share|improve this answer








                  New contributor




                  SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  Host is down message:



                  This indicates that you don't know a route to the desired destination, or a remote router reports that it has no route to the destination.



                  Timeout:



                  Indicates the absense of Echo Reply messages. No package were received within the default time.







                  share|improve this answer








                  New contributor




                  SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered Mar 21 at 13:41









                  SantiCartaSantiCarta

                  363




                  363




                  New contributor




                  SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  SantiCarta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.























                      21














                      Differences between responses are not actually determined by ICMP itself but rather indirectly.



                      ICMP can distingush between the following:



                       0 = net unreachable;

                      1 = host unreachable;

                      2 = protocol unreachable;

                      3 = port unreachable;

                      4 = fragmentation needed and DF set;

                      5 = source route failed.


                      But it does so with other network resources. Codes 0, 1, 4, and 5 may be received from a gateway. Codes 2 and 3 may be received from a host.



                      If, according to the information in the gateway's routing tables, destination network is unreachable, (e.g., the distance to the network is infinity), the gateway may send a destination unreachable message to the internet source host of the datagram. In addition, in some networks, the gateway may be able to determine if the internet destination host is unreachable. It is the Gateways in these networks that can send destination unreachable messages to the source host when the destination host is unreachable, so it's not actually ICMP doing the determinations.



                      In the case that in the destination host, the IP module cannot deliver the datagram because the indicated protocol module or process port is not active, then the destination host may send a 'destination unreachable' message to the source host.



                      Finally, if a datagram must be fragmented to be forwarded by a gateway yet the 'Do not Fragment' flag is on, the gateway will discard the datagram and will return a 'destination unreachable' message.



                      Now to difference between the 2 separate cases: Request Timed Out means that no Echo Reply messages were received within the set time. This can be due to many different causes: ARP request failure, network congestion, packet filtering, routing error, or a even silent discard.



                      When you get a Reply From [IP address]: 'Destination Host Unreachable,' then the problem occurred at/after a remote router, whose address is indicated by the [IP address]. So it's a router telling you that there is a problem between it and the destination address.






                      share|improve this answer


















                      • 3





                        no router or other device needs to be involved. Both Windows and Linux produce "host unreachable" if the host is in a local subnet and there is no ARP entry.

                        – Oh My Goodness
                        Mar 21 at 15:53











                      • If a host is unreachable it cannot produce a receivable-by-initiator answer.

                        – Overmind
                        Mar 22 at 7:25











                      • The pinging host produces the message. Obviously the destination cannot.

                        – Oh My Goodness
                        Mar 22 at 7:34











                      • That comes form the gateway.

                        – Overmind
                        Mar 22 at 7:40











                      • No. "Gateway" is a layer 3 construct. There is no routing, and thus no gateway involved at all when pinging a host on the local subnet.

                        – Oh My Goodness
                        Mar 22 at 7:53















                      21














                      Differences between responses are not actually determined by ICMP itself but rather indirectly.



                      ICMP can distingush between the following:



                       0 = net unreachable;

                      1 = host unreachable;

                      2 = protocol unreachable;

                      3 = port unreachable;

                      4 = fragmentation needed and DF set;

                      5 = source route failed.


                      But it does so with other network resources. Codes 0, 1, 4, and 5 may be received from a gateway. Codes 2 and 3 may be received from a host.



                      If, according to the information in the gateway's routing tables, destination network is unreachable, (e.g., the distance to the network is infinity), the gateway may send a destination unreachable message to the internet source host of the datagram. In addition, in some networks, the gateway may be able to determine if the internet destination host is unreachable. It is the Gateways in these networks that can send destination unreachable messages to the source host when the destination host is unreachable, so it's not actually ICMP doing the determinations.



                      In the case that in the destination host, the IP module cannot deliver the datagram because the indicated protocol module or process port is not active, then the destination host may send a 'destination unreachable' message to the source host.



                      Finally, if a datagram must be fragmented to be forwarded by a gateway yet the 'Do not Fragment' flag is on, the gateway will discard the datagram and will return a 'destination unreachable' message.



                      Now to difference between the 2 separate cases: Request Timed Out means that no Echo Reply messages were received within the set time. This can be due to many different causes: ARP request failure, network congestion, packet filtering, routing error, or a even silent discard.



                      When you get a Reply From [IP address]: 'Destination Host Unreachable,' then the problem occurred at/after a remote router, whose address is indicated by the [IP address]. So it's a router telling you that there is a problem between it and the destination address.






                      share|improve this answer


















                      • 3





                        no router or other device needs to be involved. Both Windows and Linux produce "host unreachable" if the host is in a local subnet and there is no ARP entry.

                        – Oh My Goodness
                        Mar 21 at 15:53











                      • If a host is unreachable it cannot produce a receivable-by-initiator answer.

                        – Overmind
                        Mar 22 at 7:25











                      • The pinging host produces the message. Obviously the destination cannot.

                        – Oh My Goodness
                        Mar 22 at 7:34











                      • That comes form the gateway.

                        – Overmind
                        Mar 22 at 7:40











                      • No. "Gateway" is a layer 3 construct. There is no routing, and thus no gateway involved at all when pinging a host on the local subnet.

                        – Oh My Goodness
                        Mar 22 at 7:53













                      21












                      21








                      21







                      Differences between responses are not actually determined by ICMP itself but rather indirectly.



                      ICMP can distingush between the following:



                       0 = net unreachable;

                      1 = host unreachable;

                      2 = protocol unreachable;

                      3 = port unreachable;

                      4 = fragmentation needed and DF set;

                      5 = source route failed.


                      But it does so with other network resources. Codes 0, 1, 4, and 5 may be received from a gateway. Codes 2 and 3 may be received from a host.



                      If, according to the information in the gateway's routing tables, destination network is unreachable, (e.g., the distance to the network is infinity), the gateway may send a destination unreachable message to the internet source host of the datagram. In addition, in some networks, the gateway may be able to determine if the internet destination host is unreachable. It is the Gateways in these networks that can send destination unreachable messages to the source host when the destination host is unreachable, so it's not actually ICMP doing the determinations.



                      In the case that in the destination host, the IP module cannot deliver the datagram because the indicated protocol module or process port is not active, then the destination host may send a 'destination unreachable' message to the source host.



                      Finally, if a datagram must be fragmented to be forwarded by a gateway yet the 'Do not Fragment' flag is on, the gateway will discard the datagram and will return a 'destination unreachable' message.



                      Now to difference between the 2 separate cases: Request Timed Out means that no Echo Reply messages were received within the set time. This can be due to many different causes: ARP request failure, network congestion, packet filtering, routing error, or a even silent discard.



                      When you get a Reply From [IP address]: 'Destination Host Unreachable,' then the problem occurred at/after a remote router, whose address is indicated by the [IP address]. So it's a router telling you that there is a problem between it and the destination address.






                      share|improve this answer













                      Differences between responses are not actually determined by ICMP itself but rather indirectly.



                      ICMP can distingush between the following:



                       0 = net unreachable;

                      1 = host unreachable;

                      2 = protocol unreachable;

                      3 = port unreachable;

                      4 = fragmentation needed and DF set;

                      5 = source route failed.


                      But it does so with other network resources. Codes 0, 1, 4, and 5 may be received from a gateway. Codes 2 and 3 may be received from a host.



                      If, according to the information in the gateway's routing tables, destination network is unreachable, (e.g., the distance to the network is infinity), the gateway may send a destination unreachable message to the internet source host of the datagram. In addition, in some networks, the gateway may be able to determine if the internet destination host is unreachable. It is the Gateways in these networks that can send destination unreachable messages to the source host when the destination host is unreachable, so it's not actually ICMP doing the determinations.



                      In the case that in the destination host, the IP module cannot deliver the datagram because the indicated protocol module or process port is not active, then the destination host may send a 'destination unreachable' message to the source host.



                      Finally, if a datagram must be fragmented to be forwarded by a gateway yet the 'Do not Fragment' flag is on, the gateway will discard the datagram and will return a 'destination unreachable' message.



                      Now to difference between the 2 separate cases: Request Timed Out means that no Echo Reply messages were received within the set time. This can be due to many different causes: ARP request failure, network congestion, packet filtering, routing error, or a even silent discard.



                      When you get a Reply From [IP address]: 'Destination Host Unreachable,' then the problem occurred at/after a remote router, whose address is indicated by the [IP address]. So it's a router telling you that there is a problem between it and the destination address.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Mar 21 at 9:32









                      OvermindOvermind

                      1,213514




                      1,213514







                      • 3





                        no router or other device needs to be involved. Both Windows and Linux produce "host unreachable" if the host is in a local subnet and there is no ARP entry.

                        – Oh My Goodness
                        Mar 21 at 15:53











                      • If a host is unreachable it cannot produce a receivable-by-initiator answer.

                        – Overmind
                        Mar 22 at 7:25











                      • The pinging host produces the message. Obviously the destination cannot.

                        – Oh My Goodness
                        Mar 22 at 7:34











                      • That comes form the gateway.

                        – Overmind
                        Mar 22 at 7:40











                      • No. "Gateway" is a layer 3 construct. There is no routing, and thus no gateway involved at all when pinging a host on the local subnet.

                        – Oh My Goodness
                        Mar 22 at 7:53












                      • 3





                        no router or other device needs to be involved. Both Windows and Linux produce "host unreachable" if the host is in a local subnet and there is no ARP entry.

                        – Oh My Goodness
                        Mar 21 at 15:53











                      • If a host is unreachable it cannot produce a receivable-by-initiator answer.

                        – Overmind
                        Mar 22 at 7:25











                      • The pinging host produces the message. Obviously the destination cannot.

                        – Oh My Goodness
                        Mar 22 at 7:34











                      • That comes form the gateway.

                        – Overmind
                        Mar 22 at 7:40











                      • No. "Gateway" is a layer 3 construct. There is no routing, and thus no gateway involved at all when pinging a host on the local subnet.

                        – Oh My Goodness
                        Mar 22 at 7:53







                      3




                      3





                      no router or other device needs to be involved. Both Windows and Linux produce "host unreachable" if the host is in a local subnet and there is no ARP entry.

                      – Oh My Goodness
                      Mar 21 at 15:53





                      no router or other device needs to be involved. Both Windows and Linux produce "host unreachable" if the host is in a local subnet and there is no ARP entry.

                      – Oh My Goodness
                      Mar 21 at 15:53













                      If a host is unreachable it cannot produce a receivable-by-initiator answer.

                      – Overmind
                      Mar 22 at 7:25





                      If a host is unreachable it cannot produce a receivable-by-initiator answer.

                      – Overmind
                      Mar 22 at 7:25













                      The pinging host produces the message. Obviously the destination cannot.

                      – Oh My Goodness
                      Mar 22 at 7:34





                      The pinging host produces the message. Obviously the destination cannot.

                      – Oh My Goodness
                      Mar 22 at 7:34













                      That comes form the gateway.

                      – Overmind
                      Mar 22 at 7:40





                      That comes form the gateway.

                      – Overmind
                      Mar 22 at 7:40













                      No. "Gateway" is a layer 3 construct. There is no routing, and thus no gateway involved at all when pinging a host on the local subnet.

                      – Oh My Goodness
                      Mar 22 at 7:53





                      No. "Gateway" is a layer 3 construct. There is no routing, and thus no gateway involved at all when pinging a host on the local subnet.

                      – Oh My Goodness
                      Mar 22 at 7:53











                      -3














                      You cant ping if the computer isnt connected to the internet because by pinging you actually request the ip of the host .






                      share|improve this answer








                      New contributor




                      Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.
























                        -3














                        You cant ping if the computer isnt connected to the internet because by pinging you actually request the ip of the host .






                        share|improve this answer








                        New contributor




                        Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.






















                          -3












                          -3








                          -3







                          You cant ping if the computer isnt connected to the internet because by pinging you actually request the ip of the host .






                          share|improve this answer








                          New contributor




                          Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          You cant ping if the computer isnt connected to the internet because by pinging you actually request the ip of the host .







                          share|improve this answer








                          New contributor




                          Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          share|improve this answer



                          share|improve this answer






                          New contributor




                          Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered Mar 22 at 12:31









                          AltairAltair

                          1




                          1




                          New contributor




                          Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Altair is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Server Fault!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f959259%2fhow-can-ping-know-if-my-host-is-down%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

                              Tähtien Talli Jäsenet | Lähteet | NavigointivalikkoSuomen Hippos – Tähtien Talli

                              Do these cracks on my tires look bad? The Next CEO of Stack OverflowDry rot tire should I replace?Having to replace tiresFishtailed so easily? Bad tires? ABS?Filling the tires with something other than air, to avoid puncture hassles?Used Michelin tires safe to install?Do these tyre cracks necessitate replacement?Rumbling noise: tires or mechanicalIs it possible to fix noisy feathered tires?Are bad winter tires still better than summer tires in winter?Torque converter failure - Related to replacing only 2 tires?Why use snow tires on all 4 wheels on 2-wheel-drive cars?