计网实验Computer Networking.docx
《计网实验Computer Networking.docx》由会员分享,可在线阅读,更多相关《计网实验Computer Networking.docx(11页珍藏版)》请在冰点文库上搜索。
![计网实验Computer Networking.docx](https://file1.bingdoc.com/fileroot1/2023-5/21/b3a7b133-f851-4197-82fe-62bab675e66c/b3a7b133-f851-4197-82fe-62bab675e66c1.gif)
计网实验ComputerNetworking
《计算机通信与网络实验》
课程实验报告
实验三:
ComputerNetworking
实验名称:
ComputerNetworking
LearningObjectivevs
Atcompletionofthislab,youwillbeableto:
1.Understandtheuseofcross-overandstraight-throughcablesfornetworking
2.FormasimplestEthernetwithtwocomputers
3.FormaswitchedEthernet
4.ConfigureTCP/IPparametersforthehostsandverifyconnectivityonthenetwork
5.ConfigurethenetworktoallowInternetsharing
ReportandFeedbackonthislab
Answerallquestionswithsupportingscreenshots.Pleasealsofillinthefollowingfeedbackformandappendittothereport.Yourfeedbackisvaluabletoussothatwecanimprovethislab,andmakethelabbetter.
Foreachtask,pleaseratethefollowinginthescaleof1through5:
∙Thedegreeofdifficulty:
1=tooeasy;5=toodifficult
∙Thelearningexperience:
1=learnednothing;5=learnedalot
∙Yourinterest:
1=nointerest;5=highinterest
∙Timeusedforthetask:
inminutes
Task
Difficulty(1—5)
Learning(1—5)
Interest(1—5)
Time(min)
background
Task1
Task2
Task3
Yoursuggestion/comment:
Background
Youneedtoreadandanswerthequestionsinthisbackgroundpartbeforethelab.Thislabhastobedoneinagroupof2or3persons.
Toformanetworkfordatacommunications,itisnecessarytoknowhowtoconnecthosts(computers)tothenetworkintermediatedevice(switch,router)andhowtointerconnectintermediatedevices.ReadmoreontheminLecture07.
Question1:
Explainwhatarecross-overandstraight-throughEthernetcables?
Howaretheyusedinnetworkconnections?
交叉线是把网线的TX和RX互换,即两个RJ45网口接收1~发送2,接收2~发送1。
交叉线一般用于相同设备的连接。
直连线是标准的网线,需要连接交换机使用,用于不同设备之间。
PingandTraceroute(tracert)aretwoimportantandusefulutilitytoolsfornetworktestinganddebugging.Readmoreonthemandlearnhowtousethem:
∙MSWindowspingcommand,
∙MSWindowstracertcommand,
Foreachhostorrouter,thereisaroutingtablethatguidestheIPdeliveryandforwarding.Readmoreonroutingtable(forwardingtable)inLecture15,andlearnhowtogettheroutingtableonahostrunningMSWindows,howtointerprettheroutingtable.IfyoucouldnotreachInternet,firstthingyoushoulddoistochecktheroutingtable.
∙MSWindowsroutecommand
Question2:
howtogettheroutingtable?
Includetheroutingtableonyourlaptopcomputerinthereport.Fromtheroutingtable,tellwhatyourcomputerIPaddressanddefaultgatewayIPaddressare.
WhenyouidentifyahostontheInternet,youusuallyusethedomainnameorhostname.ButifyoudonotconfigurethelocaldomainnameserverIPaddresscorrectly,youwouldnotbeabletousedomainnameservicefornameresolution.
InMSWindows,youcanuseIPconfigcommandtodisplayallcurrentTCP/IPnetworkconfiguration.
∙MSWindowsIPconfigcommand
Question3:
HowtofindyourlocaldomainnameserverIPaddresses?
Whataretheseaddressesconfiguredonyourcomputer?
HowtoconfigurethelocalDNSserveraddressesinMSWindows?
Task1.SimplestEthernetImplementation
Inthistask,youdonotneedtousewirelessLAN.SoyoucandisableWiFionbothlaptops.
Hardwareusedinthistask:
2laptopsand1cross-overEthernetcable
Useacross-overcabletoconnect2laptopstoeachotherthroughtheirEthernetports,asshownbelow:
Question4:
WhataretheIPaddressandnetworkmaskoneachEthernetadapter?
Usecommandpingtotesttheconnectivity.Thatis,ononecomputerrunpingtoverifythatitcanreachtheothercomputer.Ifitcannotreachtheothercomputer,youneedtotroubleshoot:
∙Makesurethatyouhaveturnedoffthewindowsfirewalloneachcomputer
∙VerifythecorrectIPaddressesfortheEthernetadaptersonbothcomputers.Theyhavetobeonthesamenetwork.
∙Makesurethatacross-overcableisused(onewithredcolorontheplug)
Whentheconnectivityisestablished,youcanrunAreaServerononecomputer,andrunAreaClientontheothercomputer.Youcanalsoruntheclient-Serverapplicationsonthesetwocomputers.YoucanrunWireSharktoeasilycaptureandanalyzethepacketsonthissimplestEthernet,sinceitwouldnothavesomuchdatatraffic.
Question5:
Whenthenetworkisworking,whatareIPaddressandnetworkmaskoneachcomputer?
主机信息:
IPV4地址变掉了
客户端地址没变
Question6:
Givetheroutingtableoneachcomputer.
Task2InternetSharing
ThistaskcontinuestheworkonEthernet.NowactivateWiFiononelaptop(calleditlaptopA).StartawebbrowsertotestifyoucanreachInternetfromthislaptop.Ifnot,fixthewirelessInternetaccessfirstforthiscomputer.
ThenconfiguretheInternetsharingforthisWirelessconnectiontoallowothercomputersintheEthernettosharetheconnection.OnmyMSWindows7,Ididthesettings。
Whenyouenablethesharing,youwillbetoldthatanewIPaddressisassignedtoyourEthernetadapter.YoucanwritedownthisIPaddress.
Ontheotherlaptop(laptopB),youneedtodisabletheEthernetconnection,andthenre-activatetheEthernetconnectiontoallowanewIPaddressinthesamenetworktobeassigned.
RunpingcommandonlaptopBtotestifyouareabletoreacheachother.Ifnot,youneedtodotroubleshootingandfixtheproblem(bycheckingifIPaddressesforbothEthernetadaptersareinthesamenetwork).
Question7:
WhatareIPaddressandnetworkmaskforeachEthernetadapteroneachcomputer?
Then,startawebbrowseronlaptopB.TestifyouareabletoviewahomepageonInternet(bysharingtheWiFiInternetaccessontheotherlaptop).Ifyoucouldnot,youmaycheckfollowings:
∙Usepingtotestifyouareabletoreach192.168.156.101(thatisthemoodleserver).Ifyouabletoreachit,itmeansthatInternetsharingworks.Otherwise,youneedtotroubleshootthesharingandIPconfigurations.
∙CheckthelocalDNSserverIPaddressesforbothEthernetconnectionstomakesurethattheyarecorrect(youfindourlocalDNSserveraddressesinQuestion3).
Question8:
whatareIPaddress,addressmask,andDNSserveraddressforeachEthernetconnection?
Question9:
GivetheroutingtableonlaptopB.WhatisthedefaultgatewayforlaptopB.Explainhowitispossibletosendapacketto192.168.156.101.
Task3SwitchedEthernet
Inthistask,weusealayer-2switchtofromaswitchedEthernet.Theswitchweuseinthelabis.Youcanreadmoreonitfromtheinstallationguideinthebox.
Eachgroupneedstohavesomecablesandoneswitchthatallowsupto8computersfortheconnectionstoformaswitchedEthernet.Connecteachlaptoptoaswitchportwithacableandthenconnectthepoweradpatertotheswitch.Theswitchednetworklooksasbelow.
Question10:
shouldacross-overcableorstraight-throughcablebeusedtoconnectacomputertotheswitch?
cross-overcable(交叉线)不可以
straight-throughcable(直连线)可以
Infact,somenewintermediatedevicesareintelligentandtheycandetectthecabletypestointernallyadjustthemselvestothecableused.Theswitchweuseisintelligentorsmart.Youcanusecross-overcableforconnectingthehosttotheswitch.
TestthenetworkconnectivitybyusingpingcommandandusingwebbrowserforInternetsharing.Ifitisnotok,dothetroubleshootingandfixtheproblem.Listtheproblemsyouencounteredandhowyousolvetheproblemsinthereporttoo.
Question11:
WhatareIPaddressandaddressmaskfortheEthernetadapteroneachcomputer?
Question12:
Inaswitchednetwork,cananyhostcapturethepacketssentbyanyotherhost?
Whyorwhynot?
可以
Ifyouwanttoincreasethenetworksize,youcaninterconnectswitches.Forexample,with2switches,youareabletoformaswitchednetworkwith14computers.
Question13:
shouldacross-overcableorstraight-throughcablebeusedtoconnectaswitchtoanotherswitch?