traceroute程序是用于展示数据如何到达终点(具体显示其中经过的计算机设备的IP地址及途径主机的RTT(Round trip time))英文一篇文章上如此解释:A traceroute provides a map of how data on the internet travels from its source to its destination.
RTT是指一个计算机设备(发送方)发送信息到另一个计算机设备(接收方)而接收方恢复消息最后回到发送方的总时间。RTT is the total time it takes for the request to travel over the network and for the response to travel back.
在计算机终端输入traceroute 网址即可运行计算机的traceroute程序,示例如下:
traceroute www.bilibili.com
traceroute: Warning: www.bilibili.com has multiple addresses; using 221.204.56.86
traceroute to a.w.bilicdn1.com (221.204.56.86), 64 hops max, 52 byte packets
1 localhost (IP of first router message arrives) 4.420 ms 3.669 ms 4.072 ms
2 localhost (IP of ???) 3.849 ms 3.876 ms 4.132 ms
3 171.116.224.1 (171.116.224.1) 9.960 ms 5.621 ms 5.306 ms
4 145.128.26.218.router-switch.sx.cn (218.26.128.145) 5.930 ms 4.657 ms
153.128.26.218.router-switch.sx.cn (218.26.128.153) 6.153 ms
5 9.135.26.218.router-switch.sx.cn (218.26.135.9) 12.775 ms
237.125.26.218.internet.sx.cn (218.26.125.237) 15.172 ms
197.151.26.218.internet.sx.cn (218.26.151.197) 12.914 ms
6 186.5.204.221.adsl-pool.sx.cn (221.204.5.186) 5.078 ms
114.3.204.221.adsl-pool.sx.cn (221.204.3.114) 5.649 ms
162.5.204.221.adsl-pool.sx.cn (221.204.5.162) 6.673 ms
7 * * *
其中第一列是hop的次数,第二列是到达的计算机设备的IP地址,第三,四,五列代表的是三次RRT。第7行开始开始出现* * *,是由于该跃点不响应或超时,进一步的原因可能是该跃点协议上要求不回应traceroute程序。
此刻我有一些问题:1.虽然有的网站我可以ping成功,但我不明白为什么traceroute无法到达终点,中途就会开始出现* * *一直到最后
2.第二个跃点的Ip是指什么?我查过我的计算机网络设置,所以我知道第一个是指的router。
意外发现:当我想用traceroute查询我的DNS服务器的IP时,发现没有经过计算机设置的DNS服务器IP,后来明白traceroute程序是在得到目标域名的ip后才开始运行。
推荐阅读:https://www.fortinet.com/resources/cyberglossary/traceroutes#:~:text=A%20traceroute%20works%20by%20sending,to%20effectively%20transfer%20the%20data.