通信网基本知识实验报告EthernetandARP.docx
- 文档编号:25619635
- 上传时间:2023-06-10
- 格式:DOCX
- 页数:15
- 大小:1.15MB
通信网基本知识实验报告EthernetandARP.docx
《通信网基本知识实验报告EthernetandARP.docx》由会员分享,可在线阅读,更多相关《通信网基本知识实验报告EthernetandARP.docx(15页珍藏版)》请在冰豆网上搜索。
通信网基本知识实验报告EthernetandARP
实验一EthernetandARP
一、实验目的
1.加强对以太网帧格式的理解;
2.理解ARP协议的工作原理。
二、实验环境
1.PC机一台;
2.WireShark软件。
三、实验内容
1.CapturingandanalyzingEthernetframes
2.TheAddressResolutionProtocol
四、实验步骤及思考
(一)CapturingandanalyzingEthernetframes
(1)BasedonthecontentsoftheEthernetframecontainingtheHTTPGETmessage
1.Whatisthe48-bitEthernetaddressofyourcomputer?
Answer:
The48-bitEthernetaddressofmycomputeris:
c8:
0a:
a9:
db:
9b:
f3
2.Whatisthe48-bitdestinationaddressintheEthernetframe?
IsthistheEthernetaddressofgaia.cs.umass.edu?
(Hint:
theanswerisno).WhatdevicehasthisasitsEthernetaddress?
[Note:
thisisanimportantquestion,andonethatstudentssometimesgetwrong.Re-readpages468-469inthetextandmakesureyouunderstandtheanswerhere.]
Answer:
1)The48-bitdestinationaddressintheEthernetframeis:
00:
23:
89:
8d:
50:
71
2)ThisisnottheEthernetaddressofgaia.cs.umass.edu.
3)ItistheaddressofmyLinksysrouter,whickisthelinkusedtogetoffthesubnet.
3.Givethehexadecimalvalueforthetwo-byteFrametypefield.Whatdothebit(s)whosevalueis1meanwithintheflagfield?
Answer:
1)Thehexadecimalvalueforthetwo-byteFrametypefieldis:
ox0800
2)Thevalueis1withintheflagfieldmeansthefragmenthasnotbeenfragmented.
4.HowmanybytesfromtheverystartoftheEthernetframedoestheASCII“G”in“GET”appearintheEthernetframe?
Answer:
1)TheASCII“G”appears54bytesfromtheverystartoftheEthernetframe.
2)Calculationprocessasfollows:
Thereare14bytesofEthernetframe,20bytesofIPheaderand20bytesofTCPheaderbeforeHTTPdataisencountered.
5.WhatisthehexadecimalvalueoftheCRCfieldinthisEthernetframe?
Answer:
1)ThereisnoCRCfield.
2)BecausetheCRCcalculatedbeforetheWiresharkpacketsnifferstartup.
(2)BasedonthecontentsoftheEthernetframecontainingthefirstbyteoftheHTTPresponsemessage
6.WhatisthevalueoftheEthernetsourceaddress?
Isthistheaddressofyourcomputer,orofgaia.cs.umass.edu(Hint:
theanswerisno).WhatdevicehasthisasitsEthernetaddress?
Answer:
1)ThevalueoftheEthernetsourceaddressis:
00:
23:
89:
8d:
50:
71
2)Thisisneithertheaddressofyourcomputer,northeaddressofgaia.cs.umass.edu.
3)ItistheaddressofmyLinksysrouter,whichisthelinkusedtogetontomysubnet.
7.WhatisthedestinationaddressintheEthernetframe?
IsthistheEthernetaddressofyourcomputer?
Answer:
1)ThedestinationaddressintheEthernetframeis:
c8:
0a:
a9:
db:
9b:
f3
2)Itistheaddressofmycomputer.
(The48-bitEthernetaddressofmycomputeris:
c8:
0a:
a9:
db:
9b:
f3)
8.Givethehexadecimalvalueforthetwo-byteFrametypefield.Whatdothebit(s)whosevalueis1meanwithintheflagfield?
Answer:
1)Thehexadecimalvalueforthetwo-byteFrametypefieldis:
0x0800.
2)Thevalueis1withintheflagfieldmeansthefragmenthasnotbeenfragmented.
9.HowmanybytesfromtheverystartoftheEthernetframedoestheASCII“O”in“OK”(i.e.,theHTTPresponsecode)appearintheEthernetframe?
Answer:
1)TheASCII“O”appears54bytesfromtheverystartoftheEthernetframe.
2)Calculationprocessasfollows:
Thereare14bytesofEthernetframe,20bytesofIPheaderand20bytesofTCPheaderbeforeHTTPdataisencountered.
10.WhatisthehexadecimalvalueoftheCRCfieldinthisEthernetframe?
Answer:
1)ThereisnoCRCfield.
2)Thereason:
BecausetheCRCcalculatedbeforetheWiresharkpacketsnifferstartup.
(二)TheAddressResolutionProtocol
(1)ARPCaching
11.Writedownthecontentsofyourcomputer’sARPcache.Whatisthemeaningofeachcolumnvalue?
Answer:
1)TheInternetAddresscolumncontainstheIPaddress,.
2)ThePhysicalAddresscolumncontainstheMACaddress,andthetypeindicatestheprotocoltype.
3)ObservingARPinaction
12.WhatarethehexadecimalvaluesforthesourceanddestinationaddressesintheEthernetframecontainingtheARPrequestmessage?
Answer:
1)ThehexadecimalvaluesforthesourceaddressesintheEthernetframecontainingtheARPrequestmessageis:
00:
23:
89:
8d:
50:
71
2)ThedestinationaddressesintheEthernetframecontainingtheARPrequestmessageis:
ff:
ff:
ff:
ff:
ff:
ff
13.Givethehexadecimalvalueforthetwo-byteEthernetFrametypefield.Whatdothebit(s)whosevalueis1meanwithintheflagfield?
Answer:
Thehexadecimalvalueforthetwo-byteEthernetFrametypefieldis:
0x0806.
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?
Answer:
TheARPopcodefieldbegins20bytesfromtheverybeginningoftheEthernetframe.
b)WhatisthevalueoftheopcodefieldwithintheARP-payloadpartoftheEthernetframeinwhichanARPrequestismade?
Answer:
ThehexvalueforopcodefieldwithingtheARP-payloadoftherequestis1.
c)DoestheARPmessagecontaintheIPaddressofthesender?
Answer:
Yes,theARPmessagecontaingtheIPaddress192.168.1.105forthesender.
d)WhereintheARPrequestdoesthe“question”appear–theEthernetaddressofthemachinewhosecorrespondingIPaddressisbeingqueried?
Answer:
Thefield“TargetMACaddress”issetto00:
00:
00:
00:
00:
00toquestionthemachinewhosecorrespondingIPaddress(192.168.1.105)isbeingqueried.
15.NowfindtheARPreplythatwassentinresponsetotheARPrequest.
a)HowmanybytesfromtheverybeginningoftheEthernetframedoestheARPopcodefieldbegin?
Answer:
TheARPopcodefieldbegins20bytesfromtheverybeginningoftheEthernetframe.
b)WhatisthevalueoftheopcodefieldwithintheARP-payloadpartoftheEthernetframeinwhichanARPresponseismade?
Answer:
ThehexvalueforopcodefieldwithingtheARP-payloadpartoftheEthernetframeis2.
c)WhereintheARPmessagedoesthe“answer”totheearlierARPrequestappear–theIPaddressofthemachinehavingtheEthernetaddresswhosecorrespondingIPaddressisbeingqueried?
Answer:
TheanswertotheearlierARPrequestappearsinthe”SenderMACaddress”field,whichcontainstheEthernetaddress00:
d0:
59:
a9:
3d:
68forthesenderwithIPaddress192.168.1.1.
16.WhatarethehexadecimalvaluesforthesourceanddestinationaddressesintheEthernetframecontainingtheARPreplymessage?
Answer:
Thehexvalueforthesourceaddressis00:
06:
25:
da:
af:
73andforthedestinationis00:
d0:
59:
a9:
3d:
68.
17.Opentheethernet-ethereal-trace-1tracefilein
http:
//gaia.cs.umass.edu/wireshark-labs/wireshark-traces.zip.ThefirstandsecondARPpacketsinthistracecorrespondtoanARPrequestsentbythecomputerrunningWireshark,andtheARPreplysenttothecomputerrunningWiresharkbythecomputerwiththeARP-requestedEthernetaddress.Butthereisyetanothercomputeronthisnetwork,asindiatedbypacket6–anotherARPrequest.WhyistherenoARPreply(sentinresponsetotheARPrequestinpacket6)inthepackettrace?
Answer:
Thereisnoreplyinthistrace,becausewearenotatthemachinethatsenttherequest.TheARPrequestisbroadcast,buttheARPreplyissentbackdirectlytothesender’sEthernetaddress.
五、实验结论
1.CRC在WireShark中是不能被抓到的,原因是CRC在抓包之前已经被计算好。
2.ARPRequest消息的Type字段值为1;ARPReplyt消息的Type字段值为2。
3.MACaddress是唯一的。
4.清空ARP缓存时(ARP–d)会出现如下的情况:
5.ARP–a可以查看ARP缓存中的内容。
六、实验总结
通过这次实验,我对ARP协议有了进一步的理解,在实验过程中遇到了许多问题,但经过查阅资料并和学姐交流,最终解决了这些问题,以实验的方式验证课本上的理论知识,学习也变得更有意义。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 通信网 基本知识 实验 报告 EthernetandARP
![提示](https://static.bdocx.com/images/bang_tan.gif)