How do you count the number of hops?












-1















I'm trying to connect to the GAN (Internet) and my final network node is 10.200.0.1



How do I count the number of Hops to reach this final network node? I've tried traceroute 10.200.0.1 But it only gave me a number of 30 hops max How do you find the number of hops over that?










share|improve this question




















  • 1





    See man traceroute, the -m option.

    – Kusalananda
    Oct 17 '18 at 15:50
















-1















I'm trying to connect to the GAN (Internet) and my final network node is 10.200.0.1



How do I count the number of Hops to reach this final network node? I've tried traceroute 10.200.0.1 But it only gave me a number of 30 hops max How do you find the number of hops over that?










share|improve this question




















  • 1





    See man traceroute, the -m option.

    – Kusalananda
    Oct 17 '18 at 15:50














-1












-1








-1








I'm trying to connect to the GAN (Internet) and my final network node is 10.200.0.1



How do I count the number of Hops to reach this final network node? I've tried traceroute 10.200.0.1 But it only gave me a number of 30 hops max How do you find the number of hops over that?










share|improve this question
















I'm trying to connect to the GAN (Internet) and my final network node is 10.200.0.1



How do I count the number of Hops to reach this final network node? I've tried traceroute 10.200.0.1 But it only gave me a number of 30 hops max How do you find the number of hops over that?







linux networking traceroute






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 17 '18 at 16:05









Jeff Schaller

41.5k1056132




41.5k1056132










asked Oct 17 '18 at 15:46









Rakata Infinite EmpireRakata Infinite Empire

137




137








  • 1





    See man traceroute, the -m option.

    – Kusalananda
    Oct 17 '18 at 15:50














  • 1





    See man traceroute, the -m option.

    – Kusalananda
    Oct 17 '18 at 15:50








1




1





See man traceroute, the -m option.

– Kusalananda
Oct 17 '18 at 15:50





See man traceroute, the -m option.

– Kusalananda
Oct 17 '18 at 15:50










2 Answers
2






active

oldest

votes


















1














To raise the number of max hops see the comment of Kusalananda, for example to probe for at least 40 hops



traceroute -m 40 10.200.0.1


To answer how to count the number of hops: traceroute offers (as far as I know) no option to explicitly only output the number of hops. You may use awk:



traceroute -m 40 10.200.0.1 | awk 'END{print $1}'


END rule is executed once only, after all the input is read. So print $1 will output the first column of last output, in your case the maximum hops.



EDIT 1:



You should consider traceroute uses ICMP requests. Not every hop does respond ICMP packets. The number of hops may vary significant if you use -T option (-T: use TCP SYN for probes)






share|improve this answer

































    0














    man traceroute:



       -m max_ttl, --max-hops=max_ttl
    Specifies the maximum number of hops (max time-to-live value)
    traceroute will probe. The default is 30.


    Btw. 30 hops should be enough for everyone. :->






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      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: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      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%2funix.stackexchange.com%2fquestions%2f476054%2fhow-do-you-count-the-number-of-hops%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      To raise the number of max hops see the comment of Kusalananda, for example to probe for at least 40 hops



      traceroute -m 40 10.200.0.1


      To answer how to count the number of hops: traceroute offers (as far as I know) no option to explicitly only output the number of hops. You may use awk:



      traceroute -m 40 10.200.0.1 | awk 'END{print $1}'


      END rule is executed once only, after all the input is read. So print $1 will output the first column of last output, in your case the maximum hops.



      EDIT 1:



      You should consider traceroute uses ICMP requests. Not every hop does respond ICMP packets. The number of hops may vary significant if you use -T option (-T: use TCP SYN for probes)






      share|improve this answer






























        1














        To raise the number of max hops see the comment of Kusalananda, for example to probe for at least 40 hops



        traceroute -m 40 10.200.0.1


        To answer how to count the number of hops: traceroute offers (as far as I know) no option to explicitly only output the number of hops. You may use awk:



        traceroute -m 40 10.200.0.1 | awk 'END{print $1}'


        END rule is executed once only, after all the input is read. So print $1 will output the first column of last output, in your case the maximum hops.



        EDIT 1:



        You should consider traceroute uses ICMP requests. Not every hop does respond ICMP packets. The number of hops may vary significant if you use -T option (-T: use TCP SYN for probes)






        share|improve this answer




























          1












          1








          1







          To raise the number of max hops see the comment of Kusalananda, for example to probe for at least 40 hops



          traceroute -m 40 10.200.0.1


          To answer how to count the number of hops: traceroute offers (as far as I know) no option to explicitly only output the number of hops. You may use awk:



          traceroute -m 40 10.200.0.1 | awk 'END{print $1}'


          END rule is executed once only, after all the input is read. So print $1 will output the first column of last output, in your case the maximum hops.



          EDIT 1:



          You should consider traceroute uses ICMP requests. Not every hop does respond ICMP packets. The number of hops may vary significant if you use -T option (-T: use TCP SYN for probes)






          share|improve this answer















          To raise the number of max hops see the comment of Kusalananda, for example to probe for at least 40 hops



          traceroute -m 40 10.200.0.1


          To answer how to count the number of hops: traceroute offers (as far as I know) no option to explicitly only output the number of hops. You may use awk:



          traceroute -m 40 10.200.0.1 | awk 'END{print $1}'


          END rule is executed once only, after all the input is read. So print $1 will output the first column of last output, in your case the maximum hops.



          EDIT 1:



          You should consider traceroute uses ICMP requests. Not every hop does respond ICMP packets. The number of hops may vary significant if you use -T option (-T: use TCP SYN for probes)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 5 at 11:02

























          answered Feb 5 at 10:42









          ChristophSChristophS

          40329




          40329

























              0














              man traceroute:



                 -m max_ttl, --max-hops=max_ttl
              Specifies the maximum number of hops (max time-to-live value)
              traceroute will probe. The default is 30.


              Btw. 30 hops should be enough for everyone. :->






              share|improve this answer




























                0














                man traceroute:



                   -m max_ttl, --max-hops=max_ttl
                Specifies the maximum number of hops (max time-to-live value)
                traceroute will probe. The default is 30.


                Btw. 30 hops should be enough for everyone. :->






                share|improve this answer


























                  0












                  0








                  0







                  man traceroute:



                     -m max_ttl, --max-hops=max_ttl
                  Specifies the maximum number of hops (max time-to-live value)
                  traceroute will probe. The default is 30.


                  Btw. 30 hops should be enough for everyone. :->






                  share|improve this answer













                  man traceroute:



                     -m max_ttl, --max-hops=max_ttl
                  Specifies the maximum number of hops (max time-to-live value)
                  traceroute will probe. The default is 30.


                  Btw. 30 hops should be enough for everyone. :->







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 17 '18 at 15:50









                  Ipor SircerIpor Sircer

                  10.8k11124




                  10.8k11124






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • 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%2funix.stackexchange.com%2fquestions%2f476054%2fhow-do-you-count-the-number-of-hops%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

                      How to make a Squid Proxy server?

                      Is this a new Fibonacci Identity?

                      19世紀