实验指导书英文.docx
- 文档编号:14641018
- 上传时间:2023-06-25
- 格式:DOCX
- 页数:34
- 大小:1.13MB
实验指导书英文.docx
《实验指导书英文.docx》由会员分享,可在线阅读,更多相关《实验指导书英文.docx(34页珍藏版)》请在冰点文库上搜索。
实验指导书英文
ZaozhuangUniversity
CollegeofInformationScienceandEngineering
ExperimentInstructor
Course:
ComputerNetwork
Teacher:
WangXia
Major:
ComputerScienceandTechnology
&NetworkEngineering
2012-9-4
Lab1:
usingEtherealtoanalyzeDDLprotocols
Inthislab,we’llinvestigatetheEthernetprotocolandtheARPprotocol.Before
beginningthislab,you’llprobablywanttoreviewsections3.4(Ethernet),and4.2(ARP)inthetext.RFC826(ftp:
//ftp.rfc-editor.org/innotes/std/std37.txt)containsthegorydetailsoftheARPprotocol,whichisusedbyanIPdevicetodeterminetheIPaddressofaremoteinterfacewhoseEthernetaddressisknown.
1.CapturingandanalyzingEthernetframes
Let’sbeginbycapturingasetofEthernetframestostudy.Dothefollowing:
1.First,makesureyourbrowser’scacheisempty.
2.StartuptheEtherealpacketsniffer
3.EnterthefollowingURLintoyourbrowserhttp:
//gaia.cs.umass.edu/ethereal-labs/HTTP-ethereal-lab-file3.html.
4.StopEtherealpacketcapture.First,findthepacketnumbers(theleftmostcolumnintheupperEtherealwindow)oftheHTTPGETmessagethatwassentyou'reyourcomputerto,aswellasthebeginningoftheHTTPresponsemessagesenttoyourcomputerbygaia.cs.umass.edu.Youshouldseeascreenthatlookssomethinglikethis(wherepacket10inthescreenshotbelowcontainstheHTTPGETmessage)
5.SincethislabisaboutEthernetandARP,we’renotinterestedinIPorhigherlayerprotocols.Solet’schangeEthereal’s“listingofcapturedpackets”windowsothatitshowsinformationonlyaboutprotocolsbelowIP.TohaveEtherealdothis,selectAnalyze->EnabledProtocols.ThenunchecktheIPboxandselectOK.YoushouldnowseeanEtherealwindowthatlookslike:
Inordertoanswerthefollowingquestions,you’llneedtolookintothepacketdetailsandpacketcontentswindows(themiddleandlowerdisplaywindowsinEthereal).
SelecttheEthernetframecontainingtheHTTPGETmessage.ExpandtheEthernetIIinformationinthepacketdetailswindow.NotethatthecontentsoftheEthernetframe(headeraswellaspayload)aredisplayedinthepacketcontentswindow.
Answerthefollowingquestions,basedonthecontentsoftheEthernetframecontainingtheHTTPGETmessage.Wheneverpossible,whenansweringaquestionyoushouldhandinaprintoutofthepacket(s)withinthetracethatyouusedtoanswerthequestionasked.Annotatetheprintouttoexplainyouranswer.Toprintapacket,useFile->Print,chooseSelectedpacketonly,choosePacketsummaryline,andselecttheminimumamountofpacketdetailthatyouneedtoanswerthequestion.
1.Whatisthe48-bitEthernetaddressofyourcomputer?
2.Whatisthe48-bitdestinationaddressintheEthernetframe?
IsthistheEthernetaddressofgaia.cs.umass.edu?
(Hint:
theanswerisno).WhatdevicehasthisasitsEthernetaddress?
[Note:
thisisanimportantquestion,andonethatstudentssometimesgetwrong.Re-readpages450-451inthetextandmakesureyouunderstandtheanswerhere.]
3.Givethehexadecimalvalueforthetwo-byteFrametypefield.Whatdothebit(s)whosevalueis1meanwithintheflagfield?
4.HowmanybytesfromtheverystartoftheEthernetframedoestheASCII“G”in“GET”appearintheEthernetframe?
5.WhatisthehexadecimalvalueoftheCRCfieldinthisEthernetframe?
Next,answerthefollowingquestions,basedonthecontentsoftheEthernetframecontainingthefirstbyteoftheHTTPresponsemessage.
6.WhatisthevalueoftheEthernetsourceaddress?
Isthistheaddressofyourcomputer,orofgaia.cs.umass.edu(Hint:
theanswerisno).WhatdevicehasthisasitsEthernetaddress?
7.WhatisthedestinationaddressintheEthernetframe?
IsthistheEthernetaddress
ofyourcomputer?
8.Givethehexadecimalvalueforthetwo-byteFrametypefield.Whatdothebit(s)whosevalueis1meanwithintheflagfield?
9.HowmanybytesfromtheverystartoftheEthernetframedoestheASCII“O”in“OK”(i.e.,theHTTPresponsecode)appearintheEthernetframe?
10.WhatisthehexadecimalvalueoftheCRCfieldinthisEthernetframe?
2.TheAddressResolutionProtocol
Inthissection,we’llobservetheARPprotocolinaction.Westronglyrecommendthatyoure-readsection5.4.2inthetextbeforeproceeding.
ARPCaching
RecallthattheARPprotocoltypicallymaintainsacacheofIP-to-EthernetaddresstranslationpairsonyourcomnputerThearpcommandisusedtoviewandmanipulatethecontentsofthiscache.SincethearpcommandandtheARPprotocolhavethesamename,it’sunderstandablyeasytoconfusethem.Butkeepinmindthattheyaredifferent-thearpcommandisusedtoviewandmanipulatetheARPcachecontents,whiletheARPprotocoldefinestheformatandmeaningofthemessagessentandreceived,anddefinestheactionstakenonmessagetransmissionandreceipt.
Let’stakealookatthecontentsoftheARPcacheonyourcomputer:
MS-DOS.Thearpcommandisinc:
\windows\system32,sotypeeither“arp”or
“c:
\windows\system32\arp”intheMS-DOScommandline(withoutquotation
marks).
ThearpcommandwithnoargumentswilldisplaythecontentsoftheARPcacheonyourcomputer.Runthearpcommand.
11.Writedownthecontentsofyourcomputer’sARPcache.Whatisthemeaningofeachcolumnvalue?
InordertoobserveyourcomputersendingandreceivingARPmessages,we’llneedtocleartheARPcache,sinceotherwiseyourcomputerislikelytofindaneededIP-EthernetaddresstranslationpairinitscacheandconsequentlynotneedtosendoutanARPmessage.
MS-DOS.TheMS-DOSarp–d*commandwillclearyourARPcache.The–d
flagindicatesadeletionoperation,andthe*isthewildcardthatsaystodeleteall
tableentries.
ObservingARPinaction
Dothefollowing:
1.ClearyourARPcache,asdescribedabove.
2.Next,makesureyourbrowser’scacheisempty.
3.StartuptheEtherealpacketsniffer
4.EnterthefollowingURLintoyourbrowserhttp:
//gaia.cs.umass.edu/ethereal-labs/HTTP-ethereal-lab-file3.html
5.StopEtherealpacketcapture.Again,we’renotinterestedinIPorhigher-layer
protocols,sochangeEthereal’s“listingofcapturedpackets”windowsothatitshowsinformationonlyaboutprotocolsbelowIP.TohaveEtherealdothis,selectAnalyze->EnabledProtocols.ThenunchecktheIPboxandselectOK.YoushouldnowseeanEtherealwindowthatlookslik:
Intheexampleabove,thefirsttwoframesinthetracecontainARPmessages(asdoesthe6thmessage).
Answerthefollowingquestions:
12.WhatarethehexadecimalvaluesforthesourceanddestinationaddressesintheEthernetframecontainingtheARPrequestmessage?
13.Givethehexadecimalvalueforthetwo-byteEthernetFrametypefield.Whatdothebit(s)whosevalueis1meanwithintheflagfield?
14.DownloadtheARPspecificationfromftp:
//ftp.rfc-editor.org/innotes/std/std37.txt.Areadable,detaileddiscussionofARPisalsoathttp:
//www.erg.abdn.ac.uk/users/gorry/course/inet-pages/arp.html.
a)HowmanybytesfromtheverybeginningoftheEthernetframedoestheARPopcodefieldbegin?
b)WhatisthevalueoftheopcodefieldwithintheARP-payloadpartoftheEthernetframeinwhichanARPrequestismade?
c)DoestheARPmessagecontaintheIPaddressofthesender?
d)WhereintheARPrequestdoesthe“question”appear–theEthernetaddressofthemachinewhosecorrespondingIPaddressisbeingqueried?
15.NowfindtheARPreplythatwassentinresponsetotheARPrequest.
a)HowmanybytesfromtheverybeginningoftheEthernetframedoestheARPopcodefieldbegin?
b)WhatisthevalueoftheopcodefieldwithintheARP-payloadpartoftheEthernetframeinwhichanARPresponseismade?
c)WhereintheARPmessagedoesthe“answer”totheearlierARPrequestappear–theIPaddressofthemachinehavingtheEthernetaddresswhosecorrespondingIPaddressisbeingqueried?
16.WhatarethehexadecimalvaluesforthesourceanddestinationaddressesintheEthernetframecontainingtheARPreplymessage?
17.Opentheethernet--ethereal-trace-tracefileinttp:
//gaia.cs.umass.edu/ethereallabs/ethereal-traces.zip.ThefirstandsecondARPpacketsinthistracecorrespondtoanARPrequestsentbythecomputerrunningEthereal,andtheARPreplysenttothecomputerrunningEtherealbythecomputerwiththeARP-requestedEthernetaddress.Butthereisyetanothercomputeronthisnetwork,asindiatedbypacket6–anotherARPrequest.WhyistherenoARPreply(sentinresponsetotheARPrequestinpacket6)inthepackettrace?
ExtraCredit
EX-1.Thearpcommand:
arp-sInetAddrEtherAddr
allowsyoutomanuallyaddanentrytotheARPcachethatresolvestheIPaddressInetAddrtothephysicaladdressEtherAddr.Whatwouldhappenif,whenyoumanuallyaddedanentry,youenteredthecorrectIPaddress,butthewrongEthernetaddressforthatremoteinterface?
EX-2.WhatisthedefaultamountoftimethatanentryremainsinyourARPcachebeforebeingremoved.Youcandeterminethisempirically(bymonitoringthecachecontents)orbylookingthisupinyouroperationsystemdocumentation.Indicatehow/whereyoudeterminedthisvalue.
Lab2:
usingEtherealtoanalyzeIP
Inthislab,we’llinvestigatetheIPprotocol,focusingontheIPdatagram.We’lldosobyanalyzingatraceofIPdatagramssentandreceivedbyanexecutionofthetracerouteprogram(thetracerouteprogramitselfisexploredinmoredetailintheEtherealICMPlab).We’llinvestigatethevariousfieldsintheIPdatagram,andstudyIPfragmentationindetail.
1.Capturingpacketsfromanexecutionoftraceroute
InordertogenerateatraceofIPdatagramsforthislab,we’llusethetracerouteprogramtosenddatagramsofdifferentsizestowardssomedestination,X.Reca
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实验 指导书 英文