09-04-2019 02:12 AM
I have two win7 PCs:
pc1 is 10.10.10.2
pc2 is 10.10.10.3
when I execute "ping 10.10.10.3" from 10.10.10.2,using wireshark to check the ttl value in the ping request packet,the ttl is 64;
however when I execute "ping 10.10.10.2" from 10.10.10.3,the ttl value in the ping response packet is 128.
so the "TTL" value on the same server can be different in ping request packet and response packet?
how to modify the "request" and "response" ttl?
09-04-2019 03:49 AM - edited 09-04-2019 03:52 AM
yes you can specify the TTL
the TTL in the packet is decremented by a router after each "hop" (router traversal)
So you can limit how "far" you want the packet to travel.
a similar mechanism is used in the command traceroute this performs something like multiple ping's with incrementing TTL.
and at each response report router was reached.
you need option ping -i <count> to specify Time To Live.
on a windows system use ping /? to see the all options you can add to your command
09-04-2019 03:55 AM
I know how TTL works , what confuses me is that on the same machine,when it sends a icmp request,the ttl in its packet is 64,however when it sends a icmp reply,the ttl in its packet is 128.
09-04-2019 09:43 AM
Hello Aaron,
I think that the ICMP echo-reply uses the TTL value in the ICMP echo message.
The ICMP echo sender uses a default TTL value that is operating system type depending can be 64, or 128 or 255. The responder uses the TTL value seen in the ICMP echo recieved.
This should explain what you see.
Hope to help
Giuseppe
09-04-2019 07:00 PM
I use wireshark to capture some packets,it looks like the "reply" side doesn't always use the ttl in "request" side.
1) 10.82.12.211 uses ttl=64 when it sends icmp request message(many articles say win7 have default ttl=128,but here it uses 64).
2) 10.82.13.208 uses ttl=128,not the 64 in ICMP request message.
Now,Lets turn it over:
1) 10.82.13.208 uses ttl=64 when it sends ICMP request message.it is different from 128 when it sends ICMP reply message.
2)10.82.12.211 uses ttl=64,it looks same as it sends ICMP request message.
It looks like there is no fixed rule...
09-05-2019 01:09 AM
both are windows-7 PC's ? -> so it is not really a very different TCP-stack
but could you verify both have same build/patches/windows version (home vs pro or ultimate?)
09-05-2019 01:19 AM
both are win7 but with different service pack.
is there any way to check the default TTL settings on a PC?
09-05-2019 03:50 AM
that question is better asked in a windows forum :-(
but it is definitively OS and version dependent
TTL values are different for different Operating Systems....... You can get the TTL value by pinging an address.
Windows | NT 4.0 SP5- | 32 | |
Windows | NT 4.0 SP6+ | 128 |
Windows | 7 | ICMP/TCP/UDP | 128 |
09-05-2019 03:59 AM
After searching google for long time,I got some details about TTL settings in IP segment: it seems that different OS have seperate default TTL settings for ICMP REQUEST and ICMP REPLY. Thank u all the same!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide