版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 会议议程时间安排说明函(6篇)
- 建筑企业劳务分包与代理连锁模式培训手册
- 考试(初级中药士-药事管理与法规)经典模拟试题及参考答案
- 脾功能亢进合并白细胞减少预防模拟试题及答案
- 角色建模面模拟试题及参考答案
- 计算机岗位模拟试题及答案
- 进行性色素性紫癜性皮病康复模拟试题及答案
- 金融出纳岗位面试模拟试题及参考答案
- 金融机构反洗钱考模拟试题及答案
- 金融行业职业素养面模拟试题目及答案
- 美术超轻黏土课件
- 四川宜宾数字经济产业发展集团有限公司及其子公司招聘笔试题库2025
- 变压器安装合同
- GJB1330A-2019军工产品批次管理的质量控制要求
- 医院护工外包方案
- 装备价格管理办法
- 全等三角形性质公开课获奖课件省赛课一等奖课件
- 新人版九年级化学下册课件化学83金属资源的利用和保护课件人教版解析
- 眼科院感知识培训课件
- 【MOOC】《电路实验》(东南大学)章节中国大学慕课答案
- 《民国时期的服饰》课件
评论
0/150
提交评论