路由追踪理论
我正在玩跟踪路由,每次收到超时消息时,我的应用程序都会发送一个 ttl 为 0 的 ICMP 回显请求,我将 ttl 加一并重新发送包,但发生的情况是我的网络上有 2 个路由器可以通过这些路由器跟踪路由,但无论我跟踪路由到哪里,第三跳总是最终成为每次相同 IP 的开放 DNS 服务器之一。 AFAIK这是正确的traceroute实现,谁能告诉我我做错了什么?
I am toying with trace route, my application send a ICMP echo request with a ttl of 0 every time i receive a time exceeded message i increment the ttl by one and resent the package, but what happens is I have 2 routers on my network i can trace the route through these router but third hop always ends up being one of the open dns servers same ip every time no matter where i traceroute to. AFAIK this is the correct traceroute implementation, can anyone tell me what i am doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
两个路由器有可能连接到同一个对等点,并且您会得到所描述的行为。
如果没有更多信息,实际上不可能回答您的问题。
It's possible that both routers connect to the same peer, and you'd get the described behaviour.
Without more info, it's not really possible to answer your question.
虽然在没有任何附加信息的情况下很难说,但最好的选择是安装一些数据包嗅探器 - 可能是wireshark / www.wireshark.org - 并比较 icmp 数据包 - 线路上发生了什么与你的跟踪路由,以及系统做了什么/usr/bin/traceroute(或 \windows\system32\tracert)发送。
While it's hard to say without any additional information, the best bet would be to install some packet sniffer — probably wireshark / www.wireshark.org — and compare the icmp packets — what goes on the wire with your traceroute, and what does the system /usr/bin/traceroute (or \windows\system32\tracert) send.
如果路径上有 NAT 路由器,它可能会破坏您精心调整的 TTL
If you have a NAT router on the path it can screw up your nicely adjusted TTL's