freeCodeCamp/guide/chinese/security/traceroute/index.md

65 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Traceroute
localeTitle: 跟踪路由
---
**目录**
* [跟踪路由](#traceroute)
* [数据如何通过互联网传播](#how-data-travels-across-the-internet)
* [用法的一些示例](#some-examples-for-usage)
* [更多信息](#more-information)
## 跟踪路由
Traceroute是一种计算机网络诊断工具用于显示路径路径和测量Internet协议IP网络上数据包的传输延迟。路由的历史记录为从路径路径中的每个连续主机远程节点接收的分组的往返时间;每一跳的平均次数之和是建立连接所花费的总时间的度量。 Traceroute继续进行除非所有三个发送的数据包丢失超过两次然后连接丢失并且无法评估路由。另一方面Ping仅计算从目的地点开始的最终往返时间。
#### 数据如何通过互联网传播
traceroute上的每台计算机都由其IP地址标识该IP地址是由标识该计算机唯一网络连接的句点分隔的九位数字。以下是有关traceroute的一些详细信息
```
- The journey from one computer to another is known as a hop.
- The amount of time it takes to make a hop is measured in milliseconds.
- The information that travels along the traceroute is known as a packet.
```
traceroute读数通常会为跳跃时间显示三个单独的列因为每个traceroute会向每台计算机发送三个单独的信息包。在列表的最顶部traceroute将给出它将显示多少跳的限制--30跳通常是最大数。
当traceroute无法访问计算机时它将显示消息“请求超时”。每个跃点列将显示星号而不是毫秒计数。
#### 用法的一些示例
大多数实现至少包括用于指定每跳发送的查询数等待响应的时间跳跃限制和要使用的端口的选项。调用没有指定选项的traceroute会显示可用选项列表而man traceroute会显示更多详细信息包括显示的错误标志。 Linux上的简单示例
```
[root@example ~]# traceroute -w 3 -q 1 -m 16 www.google.com
traceroute to www.google.com (216.58.200.36), 16 hops max, 60 byte packets
1 192.168.4.2 (192.168.4.2) 0.136 ms
2 *
3 *
4 *
5 *
6 *
7 *
8 *
9 *
10 *
11 *
12 *
13 *
14 *
15 *
16 *
```
在上面的示例中所选的选项是等待三秒而不是五秒每个跳而不是三个只发送一个查询在放弃之前将最大跳数限制为16而不是30将www.google.com作为最终主持人。
这有助于识别可能阻止ICMP流量或Unix ping中的高端口UDP到站点的错误路由表定义或防火墙。请注意防火墙可能允许ICMP数据包但不允许其他协议的数据包。
渗透测试人员还使用Traceroute来收集有关给定主机周围的网络基础结构和IP范围的信息。
它也可以在下载数据时使用,如果有多个镜像可用于同一条数据,则可以跟踪每个镜像,以便更好地了解哪个镜像最快使用。
#### 更多信息
阅读有关Traceroute的更多信息
* [如何在Windows中使用TRACERT](https://support.microsoft.com/en-us/help/314868/how-to-use-tracert-to-troubleshoot-tcp-ip-problems-in-windows) - [如何在Linux中使用TRACERT](https://www.lifewire.com/traceroute-linux-command-4092586)