版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、精选优质文档-倾情为你奉上精选优质文档-倾情为你奉上专心-专注-专业专心-专注-专业精选优质文档-倾情为你奉上专心-专注-专业Lab 4 Wireshark Lab: ICMPSTEPS Lets begin this adventure by opening the Windows Command Prompt application (which can be found in your Accessories folder). Start up the Wireshark packet sniffer, and begin Wireshark packet capture. The pi
2、ng command is in c:windowssystem32, so type either “ping n 10 hostname” or “c:windowssystem32ping n 10 hostname” in the MS-DOS command line (without quotation marks), where hostname is a host on another continent. If youre outside of Asia, you may want to enter www.ust.hk for the Web server at Hong
3、Kong University of Science and Technology. The argument “-n 10” indicates that 10 ping messages should be sent. Then run the Ping program by typing return. When the Ping program terminates, stop the packet capture in Wireshark.QUESTIONS1、What is the IP address of your host? What is the IP address of
4、 the destination host? The IP address of my host is 31. The IP address of the destination host is .2、Why is it that an ICMP packet does not have source and destination port numbers? Because that the ICMP is a protocol in network layer, and it is designed to communicate information in network layer b
5、etween hosts and routers, rather than application layer processes. We have to notice that each ICMP packet has a “Type” and “Code” field. They will identifies the message being received. Network software can understand the ICMP message. So ICMP packet does not need to have source and destination por
6、t numbers.3、Examine one of the ping request packets sent by your host. What are the ICMP type and code numbers? What other fields does this ICMP packet have? How many bytes are the checksum, sequence number and identifier fields? The ICMP type is 8, and the code numbers is 0. This ICMP packet still
7、have Checksum、Identifier、Sequence number and data fields. Checksum field has 2 bytes. Sequence number fields has 2 bytes. Identifier field has 2 bytes.4、Examine the corresponding ping reply packet. What are the ICMP type and code numbers? What other fields does this ICMP packet have? How many bytes
8、are the checksum, sequence number and identifier fields?The ICMP type is 0, and the code numbers is 0. The ICMP packet still have Checksum、Identifier、Sequence number and data fields. Checksum field has 2 bytes. Sequence number fields has 2 bytes. Identifier field has 2 bytes.STEPS Lets begin by open
9、ing the Windows Command Prompt application (which can be found in your Accessories folder). Start up the Wireshark packet sniffer, and begin Wireshark packet capture. The tracert command is in c:windowssystem32, so type either “tracert hostname” or “c:windowssystem32tracert hostname” in the MS-DOS c
10、ommand line (without quotation marks), where hostname is a host on another continent. (Note that on a Windows machine, the command is “tracert” and not “traceroute”.) If youre outside of Europe, you may want to enter www.inria.fr for the Web server at INRIA, a computer science research institute in
11、France. Then run the Traceroute program by typing return. When the Traceroute program terminates, stop packet capture in Wireshark.QUESTIONS5. What is the IP address of your host? What is the IP address of the target destination host? The IP address of my host is 31. The IP address of the target des
12、tination host is 46. If ICMP sent UDP packets instead (as in Unix/Linux), would the IP protocol number still be 01 for the probe packets? If not, what would it be?The IP protocol number wouldnt still be 01 for the probe packets. It would be 17.7. Examine the ICMP echo packet in your screenshot. Is t
13、his different from the ICMP ping query packets in the first half of this lab? If yes, how so? The ICMP echo packet has the same fields as the ping query packet. But the data fields size is different. The ICMP ping query packets data field size is 32 bytes. But the size of data field in ICMP echo pac
14、ket is not the number. ICMP echo packetICMP ping query packets8. Examine the ICMP error packet in your screenshot. It has more fields than the ICMP echo packet. What is included in those fields? It contains the header and the first 8 bytes of the IP datagram that cause the ICMP message to be generat
15、ed. Besides, we can see that it has the original ICMP message, and it has own Type、Code and Checksum fields. ICMP echo packet ICMP error packet9. Examine the last three ICMP packets received by the source host. How are these packets different from the ICMP error packets? Why are they different? The
16、last three ICMP packets type is 0 rather than 11. That means the ICMP packet is an echo reply packet. They are different because that the last three ICMP packet have arrived the destination before the TTL expired.ICMP error packets the last three ICMP packets10. Within the tracert measurements, is t
17、here a link whose delay is significantly longer than others? Refer to the screenshot in Figure 4, is there a link whose delay is significantly longer than others? On the basis of the router names, can you guess the location of the two routers on the end of this link?In the picture, we can see that a
18、 link between step 12 and step 13 has a significantly delay longer than others. But sadly, we cant get the router name, so its hard to get the information about their location. But we can search them on the Internet. What surprise me is that both of them are in China, which means that they are not i
19、n different country. In Figure 4, we can see that a link between step 9 and step 10 has a significantly delay longer than others. Based on the router name, I can guess the link is from New York City to Pastourelle, France.QUESTIONSFor one of the programming assignments you created a UDP client ping
20、program. This ping program, unlike the standard ping program, sends UDP probe packets rather than ICMP probe packets. Use the client program to send a UDP packet with an unusual destination port number to some live host. At the same time, use Wireshark to capture any response from the target host. P
21、rovide a Wireshark screenshot for the response as well as an analysis of the response.My computer run the client, and the IP address is 31. Another computer run the server, and the IP address is 3, and the port number is 1048. So I get the Wireshark screenshot as the follow.The clients information i
22、s follow.We can get that the minimum RTTs is 6 ms. The maximum RTTs is 264 ms. The average RTTs is 132.9 ms. In this condition, Packet 2 is lost or the reply for packet 2 is lost, so packet 2 didnt get reply. But other packet get their reply.The code for client is follow.import java.io.*; import .*;
23、 import java.util.*; import java.text.SimpleDateFormat; public class PingClient private static final double LOSS_RATE = 0.3; private static final int AVERAGE_DELAY = 100; / milliseconds public static void main(String args) throws Exception if(args.length != 2) System.out.println(Required arguments:
24、host port); return; String host = args0.toString(); int port = Integer.parseInt(args1); / 建立socket DatagramSocket clientSocket = new DatagramSocket(); / 等待1秒钟 clientSocket.setSoTimeout(1000); InetAddress IPAddress = InetAddress.getByName(host); for(int i = 0; i 10; i+) / 发送报文 byte sendData = new byt
25、e1024; byte receiveData = new byte1024; Date currentTime = new Date(); SimpleDateFormat formatter = new SimpleDateFormat(yyyy-MM-dd HH:mm:ss:SSS); String timeStamp = formatter.format(currentTime); String pingMessage = PING + i + + timeStamp + + rn; sendData = pingMessage.getBytes(); DatagramPacket s
26、endPacket = new DatagramPacket(sendData, sendData.length, IPAddress, port); try Date curTime1= new Date(); clientSocket.send(sendPacket); DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length); clientSocket.receive(receivePacket);Date curTime2= new Date(); printData(receivePacket);System.out.println(RTT: + ( curTime2.getTime() - curTime1.getTime() ) + ms ); catch (.SocketTimeoutException ex) System.out.println(No Reply From Server!); clientSocket.close(); private static void printData(DatagramP
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 简易工厂转让合同范本
- 淋浴房工程变更与索赔合同
- 国有企业增资协议书范本
- 借车合同范本
- 2024年度网络安全防护系统设计与施工总承包合同
- 基于2024年度的物流服务合同
- 树木买卖合同纠纷树木买卖合同
- 体育中心场地出租合同
- 男方自愿净身出户离婚协议书完整版
- 拒绝玻璃心课件
- CCEA GC 11-2019 工程造价咨询企业服务清单
- 主题(单元)教学设计评价量表
- TCECS 822-2021 变截面双向搅拌桩技术规程
- 日语单词4000(全)
- 六上地理知识点
- 千分尺读数练习习题及答案-
- 国家开放大学《管理英语4》章节测试参考答案
- 公路工程决算编制办法(交公路发2004-507号)附表
- 电加热管(恒温加热器)测试作业指导书
- DMX512控制台简单使用说明
- 最新复旦大学体育理论考试题库
评论
0/150
提交评论