tracert 命令详解

How to Use the TRACERT Utility

The TRACERT diagnostic utility determines the route to a destination by sending Internet Control Message Protocol (ICMP) echo packets to the destination. In these packets, TRACERT uses varying IP Time-To-Live (TTL) values. Because each router along the path is required to decrement the packet‘s TTL by at least 1 before forwarding the packet, the TTL is effectively a hop counter. When the TTL on a packet reaches zero (0), the router sends an ICMP "Time Exceeded" message back to the source computer.

TRACERT sends the first echo packet with a TTL of 1 and increments the TTL by 1 on each subsequent transmission, until the destination responds or until the maximum TTL is reached. The ICMP "Time Exceeded" messages that intermediate routers send back show the route. Note however that some routers silently drop packets that have expired TTLs, and these packets are invisible to TRACERT.

TRACERT prints out an ordered list of the intermediate routers that return ICMP "Time Exceeded" messages. Using the -doption with the tracert command instructs TRACERT not to perform a DNS lookup on each IP address, so that TRACERT reports the IP address of the near-side interface of the routers.

In the following example of the tracert command and its output, the packet travels through two routers (157.54.48.1 and 11.1.0.67) to get to host 11.1.0.1. In this example, the default gateway is 157.54.48.1 and the IP address of the router on the 11.1.0.0 network is at 11.1.0.67.

The command:

C:\>tracert 11.1.0.1

The output from the command:

Tracing route to 11.1.0.1 over a maximum of 30 hops

---------------------------------------------------

1 2 ms 3 ms 2 ms 157.54.48.1

2 75 ms 83 ms 88 ms 11.1.0.67

3 73 ms 79 ms 93 ms 11.1.0.1

Trace complete.

How to Use TRACERT to Troubleshoot

You can use TRACERT to find out where a packet stopped on the network. In the following example, the default gateway has found that there is no valid path for the host on 22.110.0.1. Probably, either the router has a configuration problem, or the 22.110.0.0 network does not exist, reflecting a bad IP address.

The command:

C:\>tracert 22.110.0.1

The output from the command:

Tracing route to 22.110.0.1 over a maximum of 30 hops

-----------------------------------------------------

1 157.54.48.1 reports: Destination net unreachable.

Trace complete.

TRACERT is useful for troubleshooting large networks where several paths can lead to the same point or where many intermediate components (routers or bridges) are involved.

How to Use TRACERT Options

There are several command-line options that you can use with TRACERT, although the options are not usually necessary for standard troubleshooting.

The following example of command syntax shows all of the possible options:

tracert -d -h maximum_hops-j host-list-w timeouttarget_host

What the parameters do:

-d

Specifies to not resolve addresses to host names

-h maximum_hops

Specifies the maximum number of hops to search for the target

-j host-list

Specifies loose source route along the host-list

-w timeout

Waits the number of milliseconds specified by timeout for each

reply

target_host

Specifies the name or IP address of the target host

android+tracert命令详解,tracert 命令详解(示例代码)相关推荐

  1. Arduino :PWM详解和电路搭建以及示例代码

    Arduino :PWM详解和电路搭建以及示例代码 PWM 调制介绍 脉冲宽度调制是PWM的全称.它是数字编码的模拟信号电平.由于计算机不能输出模拟电压而只有0或5V数字电压值,我们可以应用调制方波占 ...

  2. php解析命令行参数选项,PHP 命令行参数解析工具类的示例代码

    PHP 命令行参数解析工具类的示例代码 /** * 命令行参数解析工具类 * @author guolinchao */ class CommandLine { // 临时记录短选项的选项值 priv ...

  3. android仿微信语音聊天功能,Android仿微信发送语音消息的功能及示例代码

    微信的发送语音是有一个向上取消的,我们使用ontouchlistener来监听手势,然后做出相应的操作就行了. 直接上代码: //语音操作对象 private mediaplayer mplayer ...

  4. aix服务器查看文件编码格式,Linux stat命令和AIX istat命令 (查看文件修改时间)(示例代码)...

    简介这篇文章主要介绍了Linux stat命令和AIX istat命令 (查看文件修改时间)(示例代码)以及相关的经验技巧,文章约919字,浏览量335,点赞数2,值得参考! 在工作中,经常会执行一些 ...

  5. 【Android应用开发】 Universal Image Loader ( 使用简介 | 示例代码解析 )

    作者 : 韩曙亮 转载请注明出处 : http://blog.csdn.net/shulianghan/article/details/50824912 相关地址介绍 : -- Universal I ...

  6. android camera2预览方向,Android Camera2预览偶尔会旋转90度(示例代码)

    我正在使用Android的Camera2 API开发一些应用程序.到目前为止,我已经能够在TextureView中显示预览.该应用程序默认为横向模式.使用模拟器时,预览将显示为颠倒.在我的物理Nexu ...

  7. linux unrar 密码,linux下使用unrar命令解压*.rar格式文件(示例代码)

    使用帮助 [[email protected] ~]$ unrar UNRAR 5.40 freeware      Copyright (c) 1993-2016 Alexander Roshal ...

  8. npm命令运行时报错_运行npm update等命令出错后如何分析问题根源(示例代码)

    我今天工作时,在当前前端项目工作目录下执行命令npm update 结果遇到如下错误:registry error parsing json npm ERR! Unexpected token < ...

  9. linux查看断网日志命令,Linux Screen命令使程序远离断网影响(示例代码)

    linux中强大的screen命令2008-12-02 21:53今天发现了一个"宝贝",就是Linux的screen命令,对于远程登录来说,不仅提供了类似于nohup的功能,而且 ...

  10. 服务器备份还原命令文件夹,Robocopy命令实现文件服务器镜像备份/增量备份操作(示例代码)...

    Robocopy是微软推出的可靠文件复制服务,经过测试,比xcopy更加优秀,特别是在复制ACL及文件时间戳方面. 免费同步软件通常在ACL同步这一块比较薄弱,而付费软件复杂操作,我们可以使用robo ...

最新文章

  1. 测试人员面临的测试挑战和必备技能
  2. df python 增加数据_【Note】关于玩转数据处理R语言120题的注解(P1-P50)
  3. linux服务器配置端口,Linux服务器配置-新增端口
  4. 详解 equals() 方法和 hashCode() 方法
  5. Security+ 学习笔记19 密码学应用
  6. css之限制文本行数,超出部分显示 “...“
  7. JS打开新窗口(window.open() 、href)
  8. cad延伸命令怎么用_原来我们都用错了CAD直线命令,你不能忽视的CAD直线绘制技巧详解...
  9. 人工智能与机器学习密不可分,和图像处理、模式识别有什么关系?
  10. 如何每天学习10小时,依然精力充沛?(超实用教程)
  11. Python 爬虫学习笔记三:多页内容爬取内容分析及格式化
  12. python3中eval函数用法简介_python3中eval函数用法使用简介
  13. IEEE 754二进制浮点数算术标准
  14. 倾斜摄影超大场景的三维模型轻量化与三维展示效果的关系浅析
  15. 如何制作WAV Audio DVD、AC3 Audio DVD、DTS Audio DVD封面音乐碟片?
  16. numpy高维矩阵reshape
  17. 计算几何从入门到入土(题目)
  18. 每个元音包含偶数次的最长子字符串
  19. 03 ffprobe工具详解【全】
  20. 无聊就来整活—Python自制小鸟管道游戏【含完整代码】

热门文章

  1. 【ConfluxNews】2023.3.14 警惕虚假账号和钓鱼网址
  2. html link 怎么设置密码,D-Link路由器怎么设置密码?
  3. opencc在linux环境中,linux – 安装OpenCC(简体繁体转换)
  4. android微信聊天记录导出到电脑【微信安卓版技巧】
  5. 新娘结婚程序c语言,结婚当日流程轻松应对婚礼当天的繁杂程序
  6. ts常用内置工具类型
  7. android开发农场插件,超级农场app下载 超级农场 for android v1.1.3 安卓版 下载-脚本之家...
  8. 卸载BlackICE(黑冰)后出现错误提示的解决方法
  9. 付出过就不要后悔,爱情里没有绝对地对与错,输与赢
  10. c语言自动刷票代码,简单刷票系统 c语言实现(转)