您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 人事档案/员工关系 > 12081220+金雨鑫+计网报告7
杭州电子科技大学实验报告学生姓名:金雨鑫学号:12081220指导教师:吴端坡实验地点:第1教研楼108实验时间:第10~12节一、实验室名称:计算机通信与网络实验室二、实验项目名称:DNS,DataEncapsulationandFrame三、实验学时:3学时四、实验原理:○1什么是ICMP?答:ICMP是(InternetControlMessageProtocol)Internet控制报文协议。它是TCP/IP协议族的一个子协议,用于在IP主机、路由器之间传递控制消息。控制消息是指网络通不通、主机是否可达、路由是否可用等网络本身的消息。这些控制消息虽然并不传输用户数据,但是对于用户数据的传递起着重要的作用。如下图所示,ICMP包有一个8字节长的包头,其中前4个字节是固定的格式,包含8位类型字段,8位代码字段和16位的校验和;后4个字节根据ICMP包的类型而取不同的值。○2Wireshark(前称Ethereal)是一个网络封包分析软件。网络封包分析软件的功能是撷取网络封包,并尽可能显示出最为详细的网络封包资料。Wireshark使用WinPCAP作为接口,直接与网卡进行数据报文交换。2.TCP的三次握手和四次挥手:○3ICMP是(InternetControlMessageProtocol)Internet控制报文协议。它是TCP/IP协议族的一个子协议,用于在IP主机、路由器之间传递控制消息。控制消息是指网络通不通、主机是否可达、路由是否可用等网络本身的消息。这些控制消息虽然并不传输用户数据,但是对于用户数据的传递起着重要的作用。○4Tracert(跟踪路由)是路由跟踪实用程序,用于确定IP数据包访问目标所采取的路径。Tracert命令用IP生存时间(TTL)字段和ICMP错误消息来确定从一个主机到网络上其他主机的路由。五、实验目的:1.theIPprotocol,IPfragmentationandre-assembly2.UnderstandTCP3-wayhandshakeforconnectionsetupandtermination,aswellasdataexchange3.UnderstandICMPprotocolandhowthepingprogramworks4.Understandhowtracert(traceroute)programworks六、实验内容:1.StudyWindowstracertprogramandhowtofindaroute;2.IPfragmentation;3.TCPoperations.ActiveOpen:CreateTCB,SendSYNWaitForACKtoSYNWaitForServerReceiveSYN+ACK,SendACKESTABLISHEDCLOSEDSYN-SENTClientStateServerStateCLOSEDSYN-RECEIVEDLISTENESTABLISHEDPassiveOpen:CreateTCBWaitForClientReceiveSYN,SendSYN+ACKWaitForACKtoSYNReceiveACK##ACKSYNSYN+ACK#七、实验器材(设备、元器件):PC,Wireshark八、实验步骤及结果BackgroundYouneedtoreadandanswerthequestionsinthisbackgroundpartbeforethelab.ReadLecturesonIPandICMPprotocols.ReadLecturesonTCPprotocol.Question1:InIPheader,thereisafieldcalled“protocol(type)”.Whatisitusedfor?答:用来规范数据传输方法,使不同电脑之间可以通信Question2:HowanICMPmessageistransported(encapsulation)?答:ICMP信息封装在IP报文当中。Question3:WhichICMPmessagesareusedtoimplementthePingprogram?答:Echorequestandechoresponse。Ping使用type8requests和type0replies。Question4:Useafiguretoshowthe3-wayhandshaketoestablishaconnectionintheTCPprotocol.答:第一次握手:主机A发送位码为syn=1,随机产生seqnumber=1234567的数据包到服务器,主机B由SYN=1知道,A要求建立联机;第二次握手:主机B收到请求后要确认联机信息,向A发送acknumber=(主机A的seq+1),syn=1,ack=1,随机产生seq=7654321的包第三次握手:主机A收到后检查acknumber是否正确,即第一次发送的seqnumber+1,以及位码ack是否为1,若正确,主机A会再发送acknumber=(主机B的seq+1),ack=1,主机B收到后确认seq值与ack=1则连接建立成功。完成三次握手,主机A与主机B开始传送数据Traceroute(tracert)isanimportantandusefulutilitytoolfornetworktestinganddebugging.Readmoreonitandlearnhowtouseit:MSWindowstracertcommand,=trueTask1StudyWindowstracertprogramandhowtofindarouteInMSWindows,tracertcanbeusedtofindaroutefromthesourcehost,viarouters,todestinationhost.Thistaskisabouthowtracertworksandhowwecanuseitfor.Followthestepstostartuptheprogramsandcapturethepackets.(1)StartupacommandwindowClickStartontheleftcornerofyourdesktop,andchooseRun.ThentypecmdtostartupaDOScommandwindow.Inthiswindow,youcanalsotypecommandtracert/?tolearnmoreonthecommand,orreadmoreviathelinkabove.(2)StartuptheWireSharkprogramActiveOpen:CreateTCB,SendSYNWaitForACKtoSYNWaitForServerReceiveSYN+ACK,SendACKESTABLISHEDCLOSEDSYN-SENTClientStateServerStateCLOSEDSYN-RECEIVEDLISTENESTABLISHEDPassiveOpen:CreateTCBWaitForClientReceiveSYN,SendSYN+ACKWaitForACKtoSYNReceiveACK##ACKSYNSYN+ACK#StartupWiresharkandbeginpacketcapture.(3)RunthetracertprogramTypethefollowingcommandtofindarouteto(4)StoptheWireSharkcapturingWhentracertends,stopthecapturing,andsavethedatatoafile(youcanopenthefiletoanalyzethepacketslater).(5)Copytheoutputoftracerttothelabreportfile.Byanalyzingtheoutput,wecanlearnaroutefromthesourcetothedestination,andhowabouttheresponsetimebetweenthesourceandintermediaterouters.Question5:Howmanyroutersareontheroutefromyourcomputerto答,通过上面的截图我们可以看到一共有8个路由。○110.66.64.2○2210.32.39.250○360.191.32.65○4218.75.123.233○551.164.31.198○6115.233.23.254○7115.239.209.18○8115.239.210.27(百度服务器的地址)Question6:Basedontheoutputfromthetracert,drawthemapofthenetworksbasedontheoutput.ShowtheIPaddressesforthesourcecomputer,destinationcomputer,androuters.Sourcecomputer:10.66.117.27Destinationcomputer:115.239.210.27Routers:○110.66.64.2○2210.32.39.250○360.191.32.65○4218.75.123.233○551.164.31.198○6115.233.23.254○7115.239.209.18Nowlookatthecaptureddata.(6)analyzethefirstICMPmessageSincetracertusesICMPmessagestotracetheroutetothedestinationcomputer,youcanuse“icmpandip.addr==192.168.x.x”asthedisplayfilerinWireSharktoonlydisplayICMPmessages,where192.168.x.xshouldbeyourcomputerIPaddress.ThenselectthefirstICMPEchoRequestmessagesentbyyourcomputer,andexpandtheInternetProtocolandICMPheadersofthepacketinthepacketdetailswindow(asIdidbelow,tooviewbetter,youcanusezooming).Question7:WhatisthevalueintheprotocoltypefieldofIPpacket?Whyitisthisvalue?WhatisthetypevalueinICMPheader?Whatdoesitmean?HowmanybytesarethereintheIPheader?HowmanybytesarethereinthepayloadoftheIPpacket?Explainhowyoudeterminedthenumberofpayloadbytes.答:IP数据包的协议种类是ICMP。ThevalueintheprotocoltypefieldofIPpacketisICMP(1)ThetpyevalueinICMPheaderis1.意味着无法连接到主机Headerlength:20bytes。Payloadlength:64byte
本文标题:12081220+金雨鑫+计网报告7
链接地址:https://www.777doc.com/doc-4771425 .html