TCP-IP详解卷1-08:Traceroute程序

来源:互联网 发布:薛睿逻辑怎么样知乎 编辑:程序博客网 时间:2024/05/29 02:05

TCP-IP详解卷1-08:Traceroute程序
一:介绍
    Internet,即国际互联网,是目前世界上最大的计算机网络,更确切地说是网络的网络。
    它由遍布全球的几万局域网和数百万台计算机组成,并通过用于异构网络的TCP/IP协议进行网间通信。
    互联网中,信息的传送是通过网中许多段的传输介质和设备(路由器,交换机,服务器,网关等等)从一端到达另一端。
    每一个连接在Internet上的设备,如主机、路由器、接入服务器等一般情况下都会有一个独立的IP地址。
    通过Traceroute我们可以知道信息从你的计算机到互联网另一端的主机是走的什么路径。
    当然每次数据包由某一同样的出发点(source)到达某一同样的目的地(destination)走的路径可能会不一样,但基本上来说大部分时候所走的路由是相同的。
    UNIX系统中,我们称之为Traceroute,MS Windows中为Tracert。

二:命令解释
    1: 执行失败情况下:最大跳数为30跳,超出了最大跳数范围
        C:/Documents and Settings/chp>tracert www.sina.com

        Tracing route to ara.sina.com.cn [58.63.236.35] over a maximum of 30 hops:

          1  10.87.41.1  reports: Destination net unreachable.

        Trace complete.

    2: 执行超时情况下:
        以TTL开始,接下来是主机或路由器名以及其IP地址。对于每个TTL值,发
        送3份数据报。每接收到一份ICMP报文,就计算并打印出往返时间。如果在5秒种内仍未收到3
        份数据报的任意一份的响应,则打印一个星号,并发送下一份数据报。
        C:/Documents and Settings/chp>tracert 10.87.46.12

        Tracing route to 10.87.46.12 over a maximum of 30 hops

          1    71 ms   279 ms     2 ms  10.87.41.1
          2  4294967020 ms     1 ms   278 ms  10.87.242.9
          3   322 ms     1 ms   278 ms  10.87.240.13
          4     *        *        *     Request timed out.
          5     *        *        *     Request timed out.
          6     *        *        *     Request timed out.
          7     *        *        *     Request timed out.
          8     *        *        *     Request timed out.
          9     *        *        *     Request timed out.
         10     *        *        *     Request timed out.
         11     *        *        *     Request timed out.
         12     *        *        *     Request timed out.
         13     *     ^C
    3:执行成功情况下
        C:/Documents and Settings/chp>tracert 10.87.32.152

        Tracing route to 10.87.32.152 over a maximum of 30 hops

          1    73 ms   279 ms   279 ms  10.87.41.1
          2     1 ms     1 ms   278 ms  10.87.242.9
          3     1 ms   278 ms   278 ms  10.87.240.13
          4    43 ms   278 ms   278 ms  10.87.240.10
          5    43 ms   280 ms   279 ms  10.87.241.182
          6    60 ms   278 ms    <1 ms  10.87.32.152

        Trace complete.

原创粉丝点击