当前位置:网站首页>为什么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报文是防火墙最常见的限制),就会出现你的情况。
边栏推荐
猜你喜欢

成为IEEE学生会员

uniapp 热更新后台管理

Question bank and simulation examination for operation certificate of refrigeration and air conditioning equipment in 2022

ZUCC_编译语言原理与编译_实验02 FSharp OCaml语言

中国芯片独角兽公司

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

Vscode install the remote -wsl plug-in to connect to the local WSL

ZUCC_ Principles of compiling language and compilation_ Experiment 01 language analysis and introduction

独立站运营中如何提升客户留存率?客户细分很重要!

LabVIEW finds prime numbers in an array of n elements
随机推荐
Review SGI STL secondary space configurator (internal storage pool) | notes for personal use
js中通过key查找和更新对象中指定值的方法
2021-03-11 comp9021 class 8 notes
"Adobe international certification" Photoshop software, about drawing tutorial?
Pyqt common system events
OpenCV to realize the basic transformation of image
2022 mobile crane driver special operation certificate examination question bank and online simulation examination
Two methods of QT exporting PDF files
DHCP, TFTP Foundation
Tencent cloud ASR product PHP realizes real-time voice authentication request
利用sonar做代码检查
Redis的Cluster集群数据倾斜
Xtrabackup for data backup
Glusterfs replacement failure brick
Matlab求解线性方程组Ax=b
饼状统计图,带有标注线,都可以自行设定其多种参数选项
Vscode install the remote -wsl plug-in to connect to the local WSL
How to replace the web player easyplayerproactivex Key in OCX?
"Wechat cloud hosting" first practical battle | introduction to minimalist demo
5分钟,客服聊天处理技巧,炉火纯青