当前位置:网站首页>为什么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报文是防火墙最常见的限制),就会出现你的情况。
边栏推荐
- ZUCC_ Principles of compiling language and compilation_ Experiment 03 getting started with compiler
- Common misconceptions in Tencent conference API - signature error_ code 200003
- App Startup
- There was an error checking the latest version of pip
- ZUCC_编译语言原理与编译_实验03 编译器入门
- 什么是SRE?一文详解SRE运维体系
- Building a static website with eleventy
- [untitled]
- 2022 tea artist (intermediate) work license question bank and online simulation examination
- Fund raising, trading and registration
猜你喜欢

ZUCC_ Principles of compiling language and compilation_ Experiment 03 getting started with compiler
![[explain the difference between operation and maintenance and network engineering]](/img/2b/945f468588e729336e2e973e777623.jpg)
[explain the difference between operation and maintenance and network engineering]

一文详解|增长那些事儿

jwt(json web token)

Redis cluster data skew

ZUCC_编译语言原理与编译_实验08 语法分析 LR 分析

分布式 | 如何与 DBLE 进行“秘密通话”
![Fundamentals of 3D mathematics [17] inverse square theorem](/img/59/bef931d96883288766fc94e38e0ace.png)
Fundamentals of 3D mathematics [17] inverse square theorem

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

A preliminary study of IO model
随机推荐
Micro build low code online "quick registration applet" capability
Application of tidb in Netease games
独立站运营中如何提升客户留存率?客户细分很重要!
Rescue system -- the application of read-write separation
DHCP, TFTP Foundation
Battle history between redis and me under billion level traffic
"Wechat cloud hosting" first practical battle | introduction to minimalist demo
Permission model DAC ACL RBAC ABAC
ZUCC_ Principles of compiling language and compilation_ Experiment 01 language analysis and introduction
Ordering of MySQL composite index
There was an error checking the latest version of pip
lombok 使用
Fund raising, trading and registration
js中通过key查找和更新对象中指定值的方法
2021-03-04 comp9021 class 6 notes
New technology practice, encapsulating the permission application library step by step with the activity results API
Increase insert speed
Blue screen error UNMOUNTABLE boot volume of the solution
Qmenu response in pyqt
JS scroll div scroll bar to bottom