Announcement

Collapse
No announcement yet.

TTL 51 when I ping

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • TTL 51 when I ping

    Hello,

    I notice that when I ping any machine, the TTL changes, so, if I ping to 8.8.4.4 TTL is 51, if I ping to another machine, it is 48, then 128 ...

    I am not a network expert, does anybody know why this happens?. Maybe it is too basic a question.

    I found this:

    "...Every IP packet that gets sent out has a TTL field which is set to a relatively high number (in the case of ping a TTL of 255). As the packet traverses the network, the TTL field gets decreased by one by each router it goes through; when the TTL drops to 0, the packet is discarded by the router. The IP spec says that the TTL should be set to 60 (though it's 255 for ping packets). The main purpose of this is so that a packet doesn't live forever on the network..."

    But, who sets it?.

    Thanks on advance.
    -
    Madrid (Spain).

  • #2
    Re: TTL 51 when I ping

    The sender sets the TTL value.

    The TTL value reported by the ping command is the value in the IP header of the received Echo Reply packet(s). That value will be whichever value the sending party uses, minus one for each router along the path.

    Comment


    • #3
      Re: TTL 51 when I ping

      As Ser Olmy stated in his answer, the TTL you see in your ping responses are the original TTL value of the sender decremented by 1 for each router (hop) the ping response traverses.

      Comment


      • #4
        Re: TTL 51 when I ping

        I see, thanks.

        So , the lower the TTL value, the more routers the ip packet has gone through?.

        For instance:

        TTL 48 means: 255 - X = 48 , where X is the number of routers in between?

        Again, thanks a lot,
        -
        Madrid (Spain).

        Comment


        • #5
          Re: TTL 51 when I ping

          Originally posted by loureed4 View Post
          So , the lower the TTL value, the more routers the ip packet has gone through?
          That's correct, but you have no way of knowing what the initial TTL value was.

          The default value varies from one OS to another, and an application can actually override the default. The best example is probably tracert, which wouldn't work at all if it couldn't modify the starting TTL of outgoing packets.

          Comment


          • #6
            Re: TTL 51 when I ping

            Thanks again!.

            I have just perfomed a ping between two machines within the lan, and the TTL is 128 , I don't know what to make of that.

            Really grateful for your help.
            -
            Madrid (Spain).

            Comment


            • #7
              Re: TTL 51 when I ping

              Packets sent between hosts on the same Layer 2 network (LAN) do not have to go through routers, so the TTL value you see in an Echo Reply packet will be the unaltered, initial TTL value of the opposite host.

              Comment


              • #8
                Re: TTL 51 when I ping

                Thanks a lot Ser Olmy!
                -
                Madrid (Spain).

                Comment

                Working...
                X