我注意到当我ping不同的站点时,传出的ICMP具有不同的TTL值,例如:
ping 8.8.8.8
Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=68ms TTL=116
Reply from 8.8.8.8: bytes=32 time=71ms TTL=116
Reply from 8.8.8.8: bytes=32 time=69ms TTL=116
Reply from 8.8.8.8: bytes=32 time=69ms TTL=116鉴于
ping 1.1.1.1
Pinging 1.1.1.1 with 32 bytes of data:
Reply from 1.1.1.1: bytes=32 time=94ms TTL=52
Reply from 1.1.1.1: bytes=32 time=89ms TTL=52
Reply from 1.1.1.1: bytes=32 time=87ms TTL=52
Reply from 1.1.1.1: bytes=32 time=92ms TTL=52那么,操作系统如何决定对于8.8.8.8设置高TTL是好的,而对于1.1.1.1设置较低的TTL是好的呢?
发布于 2020-11-23 16:44:45
TTL由远程主机确定。您在shell中看到的ping是echo响应。初始TTL由操作系统设置。Linux使用64,Windows 128和路由器255。每跳至少减少1个TTL。
例如:如果对Linux主机执行ping操作,其间有12跳,则TTL为64-12 = 52。
https://stackoverflow.com/questions/64964953
复制相似问题