LAN 上不同的 TTL

LAN 上不同的 TTL

我有一个位于路由器调制解调器后面的无线路由器。

如果我 ping 我的路由器调制解调器(两跳),一切似乎都很好:

robut@host:~$ ping 172.X.X.36
PING 172.X.X.36 (172.X.X.36) 56(84) bytes of data.
64 bytes from 172.X.X.36: icmp_seq=1 ttl=253 time=6.64 ms
64 bytes from 172.X.X.36: icmp_seq=2 ttl=253 time=5.08 ms
64 bytes from 172.X.X.36: icmp_seq=3 ttl=253 time=477 ms
64 bytes from 172.X.X.36: icmp_seq=4 ttl=253 time=7.97 ms
64 bytes from 172.X.X.36: icmp_seq=5 ttl=253 time=5.05 ms
64 bytes from 172.X.X.36: icmp_seq=6 ttl=253 time=5.02 ms
64 bytes from 172.X.X.36: icmp_seq=7 ttl=253 time=5.27 ms
64 bytes from 172.X.X.36: icmp_seq=8 ttl=253 time=5.58 ms

但是,如果我 ping 直接无线路由器的外部接口(一跳),就会发生一些奇怪的事情:(
我标记了一些极端异常。)

robut@host:~$ ping 172.X.X.37
PING 172.X.X.37 (172.X.X.37) 56(84) bytes of data.
64 bytes from 172.X.X.37: icmp_seq=1 ttl=116 time=0.564 ms
64 bytes from 172.X.X.37: icmp_seq=2 ttl=65 time=1.17 ms
64 bytes from 172.X.X.37: icmp_seq=3 ttl=65 time=0.623 ms
64 bytes from 172.X.X.37: icmp_seq=4 ttl=65 time=0.609 ms
64 bytes from 172.X.X.37: icmp_seq=5 ttl=116 time=0.969 ms
64 bytes from 172.X.X.37: icmp_seq=6 ttl=44 time=4.11 ms
64 bytes from 172.X.X.37: icmp_seq=7 ttl=65 time=0.993 ms
64 bytes from 172.X.X.37: icmp_seq=8 ttl=65 time=4.35 ms
64 bytes from 172.X.X.37: icmp_seq=9 ttl=44 time=23.8 ms
64 bytes from 172.X.X.37: icmp_seq=10 ttl=44 time=0.736 ms
64 bytes from 172.X.X.37: icmp_seq=11 ttl=44 time=0.685 ms
64 bytes from 172.X.X.37: icmp_seq=12 ttl=116 time=3.75 ms
64 bytes from 172.X.X.37: icmp_seq=13 ttl=116 time=4.63 ms
64 bytes from 172.X.X.37: icmp_seq=14 ttl=116 time=71.2 ms
64 bytes from 172.X.X.37: icmp_seq=15 ttl=116 time=387 ms <########
64 bytes from 172.X.X.37: icmp_seq=16 ttl=44 time=11.5 ms
64 bytes from 172.X.X.37: icmp_seq=17 ttl=65 time=2.76 ms
64 bytes from 172.X.X.37: icmp_seq=18 ttl=65 time=3.14 ms
64 bytes from 172.X.X.37: icmp_seq=19 ttl=65 time=3.78 ms
64 bytes from 172.X.X.37: icmp_seq=20 ttl=65 time=3.25 ms
64 bytes from 172.X.X.37: icmp_seq=21 ttl=65 time=13.8 ms
64 bytes from 172.X.X.37: icmp_seq=22 ttl=7 time=160 ms <########
64 bytes from 172.X.X.37: icmp_seq=23 ttl=65 time=97.8 ms
64 bytes from 172.X.X.37: icmp_seq=24 ttl=65 time=2.40 ms
64 bytes from 172.X.X.37: icmp_seq=25 ttl=116 time=12.9 ms
64 bytes from 172.X.X.37: icmp_seq=26 ttl=44 time=0.687 ms
64 bytes from 172.X.X.37: icmp_seq=27 ttl=44 time=1.62 ms
64 bytes from 172.X.X.37: icmp_seq=28 ttl=116 time=0.658 ms <########
64 bytes from 172.X.X.37: icmp_seq=29 ttl=44 time=0.655 ms
64 bytes from 172.X.X.37: icmp_seq=30 ttl=44 time=23.6 ms
64 bytes from 172.X.X.37: icmp_seq=31 ttl=65 time=114 ms
64 bytes from 172.X.X.37: icmp_seq=32 ttl=65 time=0.603 ms
64 bytes from 172.X.X.37: icmp_seq=33 ttl=65 time=1.98 ms
64 bytes from 172.X.X.37: icmp_seq=34 ttl=65 time=0.626 ms
64 bytes from 172.X.X.37: icmp_seq=35 ttl=116 time=3.73 ms
64 bytes from 172.X.X.37: icmp_seq=36 ttl=65 time=0.718 ms
64 bytes from 172.X.X.37: icmp_seq=37 ttl=65 time=0.577 ms
64 bytes from 172.X.X.37: icmp_seq=38 ttl=116 time=1.58 ms

对内部接口执行 ping 操作会返回类似结果。我已通过无线方式连接 - 明天将进行有线测试。

更新
已进行有线测试。类似的废话(选择行):

robut@host:~$ ping 172.X.X.37
PING 172.X.X.37 (172.X.X.37) 56(84) bytes of data.
64 bytes from 172.X.X.37: icmp_seq=1 ttl=44 time=0.219 ms
64 bytes from 172.X.X.37: icmp_seq=111 ttl=13 time=0.235 ms
64 bytes from 172.X.X.37: icmp_seq=112 ttl=5 time=0.247 ms
64 bytes from 172.X.X.37: icmp_seq=113 ttl=13 time=0.218 ms
64 bytes from 172.X.X.37: icmp_seq=114 ttl=5 time=0.260 ms
64 bytes from 172.X.X.37: icmp_seq=133 ttl=65 time=0.227 ms
64 bytes from 172.X.X.37: icmp_seq=134 ttl=5 time=0.205 ms
64 bytes from 172.X.X.37: icmp_seq=135 ttl=44 time=0.233 ms
64 bytes from 172.X.X.37: icmp_seq=136 ttl=67 time=0.204 ms
64 bytes from 172.X.X.37: icmp_seq=137 ttl=44 time=0.197 ms
64 bytes from 172.X.X.37: icmp_seq=138 ttl=67 time=0.204 ms
64 bytes from 172.X.X.37: icmp_seq=139 ttl=44 time=0.182 ms
64 bytes from 172.X.X.37: icmp_seq=140 ttl=65 time=0.165 ms
64 bytes from 172.X.X.37: icmp_seq=141 ttl=44 time=0.188 ms
64 bytes from 172.X.X.37: icmp_seq=142 ttl=65 time=0.223 ms
64 bytes from 172.X.X.37: icmp_seq=212 ttl=5 time=0.242 ms
64 bytes from 172.X.X.37: icmp_seq=213 ttl=80 time=0.193 ms
64 bytes from 172.X.X.37: icmp_seq=214 ttl=5 time=0.204 ms
64 bytes from 172.X.X.37: icmp_seq=233 ttl=44 time=0.195 ms
64 bytes from 172.X.X.37: icmp_seq=234 ttl=50 time=0.178 ms
64 bytes from 172.X.X.37: icmp_seq=235 ttl=44 time=0.182 ms
64 bytes from 172.X.X.37: icmp_seq=254 ttl=5 time=0.236 ms

那么:发生了什么?
为什么所有 ICMP 响应的 TTL 都不为 254?
请注意,TTL 似乎与时间没有直接关系,因为有“ttl=7 time=160 ms”,还有“ttl=116 time=387 ms”和“ttl=116 time=0.658 ms”。

我的无线路由器只是一个 POS 吗?

答案1

在您的第一个例子中,您说这是可以的,但是也存在延迟的响应,即使 TTL 与其他 ping 相同,所以看起来您在某处有一个随机延迟。

来自 172.XX36 的 64 字节:icmp_seq=3 ttl=253 time=477 ms

然而,可变的 TTL 似乎表明你在某处存在路由问题

我会运行 traceroute(或 Windows 上的 tracert),尝试查看你的 ping 实际去向

相关内容