icmp

计算机网络实验设计-基于IP多广播的网络会议程序

青春壹個敷衍的年華 提交于 2019-12-27 02:55:17
基于IP多广播的网络会议程序 一.设计题目 Tracert 与Ping 程序设计与实现 二.设计内容 参照附录 2,了解 Tracert 程序的实现原理,并调试通过。然后参考 Tracert 程序和教材 4.4.2 节,编写一个 Ping 程序,并能测试本局域网的所有机器是否在线。 三.设计步骤 首先我们要明白tracert是什么,Tracert(跟踪路由)是路由跟踪实用程序,用于确定 IP 数据包访问目标所采取的路径。Tracert 命令用 IP 生存时间 (TTL) 字段和 ICMP 错误消息来确定从一个主机到网络上其他主机的路由。 Tracert原理: 通过向目标发送不同IP生存时间 (TTL) 值的“Internet控制消息协议 (ICMP)”回应数据包,Tracert诊断程序确定到目标所采取的路由。要求路径上的每个路由器在转发数据包之前至少将数据包上的 TTL 递减 1。数据包上的 TTL 减为 0 时,路由器应该将“ICMP 已超时”的消息发回源系统。 Tracert 先发送 TTL 为 1 的回应数据包,并在随后的每次发送过程将TTL递增 1,直到目标响应或 TTL 达到最大值,从而确定路由。通过检查中间路由器发回的“ICMP 已超时”的消息确定路由。某些路由器不经询问直接丢弃 TTL 过期的数据包,这在 Tracert 实用程序中看不到。

【网络协议】ICMP协议、Ping、Traceroute

喜夏-厌秋 提交于 2019-12-26 05:34:38
ICMP协议 ICMP常常被觉得是IP层的一个组成部分,它是网络层的一个协议。它传递差错报文以及其它须要注意的信息。ICMP报文通常被IP层或更高层(TCP、UDP等)使用,它是在IP数据报内传输的。 ICMP报文大致分为两类:查询报文和差错报文。 先来看差错报文。当传送IP数据报错误发生时(比方主机不可达、网络不可达等),ICMP协议将会发送一个ICMP差错报文给源主机,好让主机做出对应的处理,也因此IP层以上的一些协议有可能做到可靠传输。 书中给出了ICMP差错报文中的一些组合(类型和代码的组合)描写叙述:如网络不可达、网络不可达、协议不可达、port不可达等。 这里说下port不可达的意思:UDP的规则之中的一个是,假设收到一份UDP数据报而目的port与某个正在使用的进程不相符,那么UDP返回一个ICMP不可达报文,将报文中的类型和代码的组合设定为port不可达。Traceroute程序就是利用port不可达来产生ICMP差错报文的。 另外,在大多数情况下,传送IP数据报错误发生,会产生一个ICMP错误报文。但以下各种情况都不会导致产生ICMP差错报文: ICMP差错报文不会产生差错报文(ICMP查询报文可能会产生ICMP差错报文); 目的地址是广播地址和多播地址的IP数据报; 作为链路层广播的数据报; 不是IP分片的第一片 源地址不是单个主机的数据报。

ICMP:Internet控制报文协议

浪子不回头ぞ 提交于 2019-12-26 01:58:37
一、简介 IP协议本身没有为终端系统提供直接的方法来发现那些发往目的地址失败的IP数据包。此外,IP没有提供直接的方式来获取诊断信息(例如,哪些路由器在沿途中被使用了或使用一种方法来估计往返时间)。为解决这些不足之处,将一个特殊的Internet控制报文协议(Internet Control Message Protocol,ICMP)与IP结合使用,以便提供与IP协议层配置和IP数据包处置相关的诊断和控制信息。 ICMP通常被认为是IP层的一部分,它需要在所有IP实现中存在。它使用IP协议进行传输。因此,确切地说,它既不是一个网络层协议,也不是一个传输层协议,二是位于两者之间。 ICMP负责传递可能需要注意的差错和控制报文。ICMP报文通常是由IP层本身、上层的传输协议(TCP/UDP等),甚至某些情况下是用户应用触发执行的。请注意, ICMP并不为IP网络提供可靠性,它只是表明了某些类别的故障和配置信息 。最常见的丢包(路由器缓冲区溢出)并不会触发任何的ICMP信息,由其他协议如TCP来处理这种情况。 鉴于ICMP能够影响重要的系统功能操作和获取配置信息,黑客们已经在大量攻击中使用ICMP报文。由于担心这些攻击,网路管理员经常会用防火墙封阻ICMP报文,特别是在边界路由器上。如果ICMP被封锁,大量的诊断程序(例如ping、traceroute)将无法正常工作。 1

Mac network ping source code compile error

蹲街弑〆低调 提交于 2019-12-24 11:34:33
问题 I download the Mac OS network ping source code from Apple: http://www.opensource.apple.com/tarballs/network_cmds/network_cmds-356.8.tar.gz and compile it in xcode, but get errors in both 10.7 and 10.6, 'IP_NO_IFT_CELLULAR' undeclared (first use in this function) 'SO_TRAFFIC_CLASS' undeclared (first use in this function) 'SO_RECV_TRAFFIC_CLASS' undeclared (first use in this function) 'SO_TRAFFIC_CLASS' undeclared (first use in this function) Did I miss something? 回答1: I thought it was possible

not getting all ICMP time-exceeded messages: why?

巧了我就是萌 提交于 2019-12-23 09:37:28
问题 I'm using Scapy to replay some dumped packets in which I change the TTL value. I've been getting very odd results even with TTL=1. When I run my test hours apart from each other, I can get from roughly 40% to 95% of packets replied to with an ICMP time-exceeded message. Then I can recursively replay unanswered packets and get each time more or less the same percentage of answered packets as before. Why is that? I've been sending packets with an interval of 0.1 seconds between each other. This

图解TCPIP-ICMP

。_饼干妹妹 提交于 2019-12-22 23:23:23
ICMP 1.确认IP包是否成功送达目标地址 2.通知IP包被废弃的具体原因 3.改善网络设置 4.类型(0回送应答echo reply;3目标不可达Destination Unreachable;) 常见类型: 3.Destination Unreachable Message 5.ICMP Redirect Message 路由器发现发送端主机使用了次优路径发送数据,就会返回ICMP重定向(ICMP Redirect Message),包含了最合适的路由信息和源数据 ICMP 超时信息(ICMP Time Exceeded Message) 1.IP包中有一个字段叫TTL(TIme to Live,生存周期),每经过一个路由,就会减1,直到减到0,被丢弃.此时就会发送超时消息. 2.IP生存周期是为了避免IP包发生循环转发的状况 ICMP回送消息 1.判断发送的数据包是否已经成功到大对端一种消息 2.可以发送回送请求消息(ICMP Echo Request Message,类型8) 3.接收(ICMP Echo Reply Message 类型0) 4.Ping命令就是利用此消息实现的 来源: CSDN 作者: Claroja 链接: https://blog.csdn.net/claroja/article/details/103523875

Is it possible to send an ICMP echo request from a swf?

你离开我真会死。 提交于 2019-12-22 12:40:01
问题 ActionScript 3 can send UDP packets via flash.net.DatagramSocket. Is their any way to send an ICMP packet? I'd also like to set the TTL flag so I can implement traceroute in an SWF. 回答1: UDP is not available on Flash Player, only on Adobe AIR runtime. So if you are not targeting a browser, you can use it. I don't know if you can send an ICMP packet with DatagramSocket - but you could try to set the TTL like this example: http://blog.debit.nl/2010/06/mdns-daap-announce-air-2-0/ And you might

Is ICMP a transport layer protocol?

▼魔方 西西 提交于 2019-12-22 03:43:47
问题 I was going through a video lecture on networking and there the lecturer mentions ICMP as a transport layer protocol. However, Googling it shows various forums describing it as network layer protocol. This has confused me a lot. Can someone clarify? 回答1: Transport layer protocols are concerned with send data from end-to-end and ensuring (or explicitly not ensuring) reliability. TCP is used to send data from one computer to another and includes logic necessary to ensure that the data is

Block ping in Windows Server 2008 R2

核能气质少年 提交于 2019-12-21 17:32:13
问题 I have deployed my Asp.Net web application on Windows Server 2008 R2 , and I want to block all ping requests to this server without effecting my application . Thanks in advance 回答1: Go to Start → Administrative Tools → Windows Firewall with Advanced Security → Inbound Rules → File and Printer Sharing (Echo Request – ICMPv4-IN) → right click and select Enable Rule . My application now works fine and when I try to ping my server I do not receive any response. 回答2: Using the solution provided by

ICMP TYPE CODE

时光怂恿深爱的人放手 提交于 2019-12-21 06:17:19
TYPE CODE Description Query Error 0 0 Echo Reply——回显应答(Ping应答) x 3 0 Network Unreachable——网络不可达 x 3 1 Host Unreachable——主机不可达 x 3 2 Protocol Unreachable——协议不可达 x 3 3 Port Unreachable——端口不可达 x 3 4 Fragmentation needed but no frag. bit set——需要进行分片但设置不分片比特 x 3 5 Source routing failed——源站选路失败 x 3 6 Destination network unknown——目的网络未知 x 3 7 Destination host unknown——目的主机未知 x 3 8 Source host isolated (obsolete)——源主机被隔离(作废不用) x 3 9 Destination network administratively prohibited——目的网络被强制禁止 x 3 10 Destination host administratively prohibited——目的主机被强制禁止 x 3 11 Network unreachable for TOS——由于服务类型TOS