How can you identify the intermediate nodes along the path using ping ONLY

Discussion in 'Linux Networking' started by aamircheema, Aug 2, 2006.

  1. aamircheema

    aamircheema Guest


    Is this possible to identify intermediate nodes by using pin command
    olnly? Somebody told me that it is. Can anyone please elaborate how?

    aamircheema, Aug 2, 2006
    1. Advertisements

  2. aamircheema

    Dave Uhring Guest

    traceroute, or tracert on that Windose POS you are using.
    Dave Uhring, Aug 2, 2006
    1. Advertisements

  3. You can set the "record route" option. Cooperating routers will add
    their info to the packet and eventually all the info gets back to you.

    There's no requirement for any router to cooperate, though.
    Allen Kistler, Aug 2, 2006
  4. aamircheema

    avasilev Guest

    Usually this is done with tracert (windows) or traceroute (*nix), but
    what tracert actually does is pinging the host with TTL increasing from
    1 with a step of one. When the TTL of the ping packet expires, the
    router at which this happens reports to you "TTL expired in transit".
    Since this reporting is done with an IP packet you know the address of
    the router from the source IP field of the report packet. Then tracert
    increases the TTL with 1 and repeats the procedure - thus the next
    router will report that the TTL expired, and so on until the actual
    host is reached. In this way you get the IP-s of routers on the way.
    You can try this yourself with the ping command (and this directly
    answers your question) - do a ping with setting the TTL of the packet
    first to 1, and look who responds to it, then set TTL to 2 and so on.
    avasilev, Aug 3, 2006
  5. aamircheema

    Lew Pitcher Guest

    Hash: SHA1

    Yes, sort of.

    You can ask for "route record" to be returned on the ping response
    packet. Up to 9 nodes can be recorded, so if your target is more than 9
    hops away, then you lose the record of some of the nodes.

    See the ping(8) manpage for details...
    -R Record route. Includes the RECORD_ROUTE option in
    the ECHO_REQUEST packet and displays the route
    buffer on returned packets. Note that the IP
    header is only large enough for nine such routes.
    Many hosts ignore or discard this option.

    - --
    Lew Pitcher

    Version: GnuPG v1.4.3 (MingW32) - WinPT 0.11.12

    -----END PGP SIGNATURE-----
    Lew Pitcher, Aug 3, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.