版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、精選優(yōu)質(zhì)文檔-傾情為你奉上精選優(yōu)質(zhì)文檔-傾情為你奉上專心-專注-專業(yè)專心-專注-專業(yè)精選優(yōu)質(zhì)文檔-傾情為你奉上專心-專注-專業(yè)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+) / 發(fā)送報文 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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 呼風喚雨說課稿
- 合理利用網(wǎng)絡(luò)說課稿
- 海上日出的說課稿精讀
- 實驗室用電安全注意事項
- 員工網(wǎng)絡(luò)安全協(xié)議
- 花店外墻修復(fù)膩子施工合同
- 交通行業(yè)網(wǎng)絡(luò)施工合同范本
- 餐飲業(yè)制服管理要點
- 歷史建筑內(nèi)套房租賃協(xié)議
- 汽車租賃:租賃合同培訓(xùn)
- 2024年感動中國年度人物介紹頒獎典禮
- 肋骨骨折講課課件
- 口腔病例匯報模板
- 2024年軍隊文職人員招聘考試公共科目真題
- 金川公司社會招聘試題
- 青島版五年級數(shù)學(xué)上冊豎式計算題100道及答案
- 幼兒園食品安全追溯管理制度
- 高級養(yǎng)老護理員試題與答案
- 《我的家鄉(xiāng)南京》課件
- GB/T 44127-2024行政事業(yè)單位公物倉建設(shè)與運行指南
- 《離心技術(shù)》課件
評論
0/150
提交評論