计算机网络实验:Ethernet-and-ARP_第1页
计算机网络实验:Ethernet-and-ARP_第2页
计算机网络实验:Ethernet-and-ARP_第3页
计算机网络实验:Ethernet-and-ARP_第4页
计算机网络实验:Ethernet-and-ARP_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Lab7EthernetandARP

1.CapturingandanalyzingEthernetframes

STEPS

•First,makesureyourbrowser’scacheisempty.(TodothisunderNetscape7.0,selectEdit->Preferences->Advanced->Cacheandclearthememoryanddiskcache.ForInternetExplorer,selectTools->InternetOptions->DeleteFiles.ForFirefoxselectTools->ClearPrivateData.

•StartuptheWiresharkpacketsniffer

•EnterthefollowingURLintoyourbrowser/wireshark-labs/HTTP-ethereal-lab-file3.htmlYourbrowsershoulddisplaytheratherlengthyUSBillofRights.

•StopWiresharkpacketcapture.First,findthepacketnumbers(theleftmostcolumnintheupperWiresharkwindow)oftheHTTPGETmessagethatwassentfromyourcomputerto,aswellasthebeginningoftheHTTPresponsemessagesenttoyourcomputerby.Youshouldseeascreenthatlookssomethinglikethis(wherepacket4inthescreenshotbelowcontainstheHTTPGETmessage)

•SincethislabisaboutEthernetandARP,we’renotinterestedinIPorhigherlayerprotocols.Solet’schangeWireshark’s“listingofcapturedpackets”windowsothatitshowsinformationonlyaboutprotocolsbelowIP.TohaveWiresharkdothis,selectAnalyze->EnabledProtocols.ThenunchecktheIPboxandselectOK.

QUESTIONS

Whatisthe48-bitEthernetaddressofyourcomputer?

The48-bitEthernetaddressofyourcomputeris3c:97:0e:ff:69:02

Whatisthe48-bitdestinationaddressintheEthernetframe?IsthistheEthernetaddressof?(Hint:theanswerisno).WhatdevicehasthisasitsEthernetaddress?[Note:thisisanimportantquestion,andonethatstudentssometimesgetwrong.Re-readpages468-469inthetextandmakesureyouunderstandtheanswerhere.]

The48-bitdestinationaddressintheEthernetframeis38:22:d6:e6:0e:0d.Thisisn’ttheEthernetaddressof.ItistheEthernetaddressofmydefaultgateway.Thatistosay,it’stheaddressofmyrouter,whichisthelinkusedtogetoffthesubnet.

Givethehexadecimalvalueforthetwo-byteFrametypefield.Whatdothebit(s)whosevalueis1meanwithintheflagfield?

Thehexadecimalvalueforthetwo-byteFrametypefieldis0x0800.

Thebit(s)whosevalueis1withintheflagfieldmeanthefragmenthasnotbeenfragmented.

eachcolumnvalue?

TheaddressofInternetcolumncontainstheIPaddress.ThephysicaladdresscolumncontainstheMACaddress.Thetypecolumntellsustheinformationabouttype:dynamicorstatic.

STEPS

•ClearyourARPcache,asdescribedabove.

•Next,makesureyourbrowser’scacheisempty.(TodothisunderNetscape7.0,selectEdit->Preferences->Advanced->Cacheandclearthememoryanddiskcache.ForInternetExplorer,selectTools->InternetOptions->DeleteFiles.)

•StartuptheWiresharkpacketsniffer

•EnterthefollowingURLintoyourbrowser/wireshark-labs/HTTP-wireshark-lab-file3.htmlYourbrowsershouldagaindisplaytheratherlengthyUSBillofRights.

•StopWiresharkpacketcapture.Again,we’renotinterestedinIPorhigher-layerprotocols,sochangeWireshark’s“listingofcapturedpackets”windowsothatitshowsinformationonlyaboutprotocolsbelowIP.TohaveWiresharkdothis,selectAnalyze->EnabledProtocols.ThenunchecktheIPboxandselectOK.YoushouldnowseeanWiresharkwindowthatlookslike:

QUESTIONS

(Thefollowinganswersarebasedontheethernet-ethereal-trace-1tracefile)

12.WhatarethehexadecimalvaluesforthesourceanddestinationaddressesintheEthernetframecontainingtheARPrequestmessage?

ThehexadecimalvaluesforthesourceaddressesintheEthernetframeis00:d0:59:a9:3d:68.ThehexadecimalvaluesforthedestinationaddressesintheEthernetframeisff:ff:ff:ff:ff:ff.

13.Givethehexadecimalvalueforthetwo-byteEthernetFrametypefield.Whatdothebit(s)whosevalueis1meanwithintheflagfield?

Thehexadecimalvalueforthetwo-byteEthernetFrametypefieldis0x0806.

Thereisnoflagfield.

14.DownloadtheARPspecificationfrom/innotes/std/std37.txt.Areadable,detaileddiscussionofARPisalsoat

http://www.erg.abdn.ac.uk/users/gorry/course/inets/arp.html

.

HowmanybytesfromtheverybeginningoftheEthernetframedoestheARPopcodefieldbegin?

Thereare14bytesofEthernetframeheader.IntheARPdata,beforetheARPopcodefieldbegin,thereare6bytes.Sothereare20bytesbeforetheARPopcodefieldbegin.

WhatisthevalueoftheopcodefieldwithintheARP-payloadpartoftheEthernetframeinwhichanARPrequestismade?

ThevalueoftheopcodefieldwithintheARP-payloadpartoftheEthernetframeinwhichanARPrequestismadeis1.

DoestheARPmessagecontaintheIPaddressofthesender?

Yes,itcontains.Inhere,theIPaddressofthesenderis05.

WhereintheARPrequestdoesthe“question”appear–theEthernetaddressofthemachinewhosecorrespondingIPaddressisbeingqueried?

Thefield“TargetMACaddress”issetto00:00:00:00:00:00toquestionthemachine’sEthernetaddresswhosecorrespondingIPaddress.

15.NowfindtheARPreplythatwassentinresponsetotheARPrequest.

HowmanybytesfromtheverybeginningoftheEthernetframedoestheARPopcodefieldbegin?

Thereare14bytesofEthernetframeheader.IntheARPdata,beforetheARPopcodefieldbegin,thereare6bytes.Sothereare20bytesbeforetheARPopcodefieldbegin.

WhatisthevalueoftheopcodefieldwithintheARP-payloadpartoftheEthernetframeinwhichanARPresponseismade?

ThevalueoftheopcodefieldwithintheARP-payloadpartoftheEthernetframeinwhichanARPresponseismadeis2

WhereintheARPmessagedoesthe“answer”totheearlierARPrequestappear–theIPaddressofthemachinehavingtheEthernetaddresswhosecorrespondingIPaddressisbeingqueried?

“SenderMACaddress”istheanswertotheearlierARPrequest.Inhere,itcontaintheMACaddressof,whichis00:06:25:da:af:73

16.WhatarethehexadecimalvaluesforthesourceanddestinationaddressesintheEthernetframecontainingtheARPreplymessage?

ThehexadecimalvaluesforthesourceaddressesintheEthernetframecontainingtheARPreplymessageis00:06:25:da:af:73.

ThehexadecimalvaluesforthedestinationaddressesintheEthernetframecontainingtheARPreplymessageis00:d0:59:a9:3d;68.

17.Opentheethernet-ethereal-trace-1tracefilein/wireshark-labs/wireshark-traces.zip.ThefirstandsecondARPpacketsinthistracecorrespondtoanARPrequestsentbythecomputerrunningWireshark,andtheARPreplysenttothecomputerrunningWiresharkbythecomputerwiththeARP-requestedEthernetaddress.Butthereisyetanothercomputeronthisnetwork,asindiatedbypacket6–anotherARPrequest.WhyistherenoARPreply(sentinresponsetotheARPrequestinpacket6)inthepackettrace?

ThisabroadcastARPpacketsentby04.Soeveryhostinthesamesubnetwillreceivethepacket.ButtheARPistotryfindtheMACaddressof17.SoonlythehostwhichhavetheIPaddressof17willreply.Now“my”host’sIPaddressis05.So“my”hostwon’treply.And“my”hostdidn’treceivethereplypacket.SothereisnoARPreply(sentinresponsetotheARPrequestinpacket6)inthepackettrace.

ExtraCredit

EX-1.Thearpcommand:arp-sInetAddrEtherAddrallowsyoutomanuallyaddanentrytotheARPcachethatresolvestheIPaddressInetAddrtothephysicaladdressEtherAddr.Whatwouldhappenif,whenyoumanuallyaddedanentry,youenteredthecorrectIPaddress,butthewro

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论