当前位置:网站首页>为什么ping不通,而traceroute却可以通
为什么ping不通,而traceroute却可以通
2022-06-24 07:05:00 【格格巫 MMQ!!】
ping是走ICMP协议。tracert走追踪路由的吓一跳。。两个命令是不一样。
如果服务器没有启用ICMP协议或者防火墙禁用ICMP,还有地址映射的时候没有做ICMP的映射,都会导致ping不通。。
tracertoute 需要路由交换开启ip追踪才行。

说明目标机拒绝响应ICMP的echo而已。
ping的时候,是发一个icmp的echo,目标机相应一个reply。然后就认为是通了。
traceroute也是发icmp echo,但是,把TTL从1开始,逐渐增加。在通路上的节点,收到一个TTL为0的ICMP的时候,就会回一个错误信息。通过这样的方式,获知通路上的节点的情况。
如果某个目标机,不响应icmp echo,却还是响应了icmp echo中TTL为0的情况,就是你这个表现了。
ping与traceroute都使用icmp协议,但其工作原理及ICMP中类型字段的定义是不同的:
对于ping,发送的是一个echo request包,类型为 8 0,当被ping者接到相关icmp包的时候,根据实际情况,逻辑是,就发回 reply 0 0,逻辑否,则根据具体情况发出一些其他的信息,总结起来的说,是看目的是否能及时的把icmp reply包送回到源,一当路径上的某个节点把reply包给deny掉了,就肯定ping不通了,比如会是time out,
对于traceroute,本质可以理解为hop by hop的ping,但这个ping和上面讲的ping不一样,这个ping和我们的ping命令不同,traceroute包发出去后,途经的每个站点都会发回一个 类型代码为11 0的icmp 包回去,到了终点,才回发送一个代码为3 3的icmp包回到源
因此,如果在某些途径的节点(路由器)上,限制了类型11的ICMP报文(ICMP报文是防火墙最常见的限制),就会出现你的情况。
边栏推荐
- Scheduled database backup script
- One development skill a day: how to establish P2P communication based on webrtc?
- ZUCC_编译语言原理与编译_大作业
- Xtrabackup for data backup
- DHCP, TFTP Foundation
- api平台通用签名机制
- 常用日期格式符与Qt获取当前时间的办法
- 【无标题】
- ZUCC_ Principles of compiling language and compilation_ Experiment 08 parsing LR parsing
- [micro services ~nacos] Nacos service providers and service consumers
猜你喜欢

Two methods of QT exporting PDF files

Base64编码详解及其变种(解决加号在URL变空格问题)

中国芯片独角兽公司
![[explain the difference between operation and maintenance and network engineering]](/img/2b/945f468588e729336e2e973e777623.jpg)
[explain the difference between operation and maintenance and network engineering]

Permission model DAC ACL RBAC ABAC

日本大阪大学万伟伟研究员介绍基于WRS系统机器人的快速集成方法和应用

Introduction to RCNN, fast RCNN and fast RCNN

JUC personal simple notes

Markdown to realize text link jump

分布式 | 如何与 DBLE 进行“秘密通话”
随机推荐
ZUCC_ Principles of compiling language and compilation_ Experiment 04 language and grammar
Pyqt common system events
常用日期格式符与Qt获取当前时间的办法
There was an error checking the latest version of pip
Win10 cloud, add Vietnamese
JS scroll div scroll bar to bottom
5分钟,客服聊天处理技巧,炉火纯青
Promise的使用場景
Promise usage scenarios
OpenCV to realize the basic transformation of image
更改SSH端口号
ZUCC_ Principles of compiling language and compilation_ Experiment 03 getting started with compiler
How to mount a USB hard disk with NTFS file format under RHEL5 system
os. path. Pits encountered during the use of join()
Paper notes: multi label learning dm2l
xtrabackup做数据备份
How to replace the web player easyplayerproactivex Key in OCX?
Markdown to realize text link jump
ZUCC_编译语言原理与编译_实验06 07 语法分析 LL 分析
Glusterfs replacement failure brick