Академический Документы
Профессиональный Документы
Культура Документы
DHCPandARP
A. DHCPOverview
DynamicHostConfigurationProtocol(DHCP)isaTCP/IPstandardforsimplifyingthe
managementofhostIPconfiguration.TheDHCPstandardprovidesfortheuseofDHCPservers
asawaytomanagedynamicallocationofIPaddressesandotherrelatedconfigurationdetails
toDHCPenabledclientsonyournetwork.
EverycomputeronaTCP/IPnetworkmusthaveauniquecomputernameandIP
address.TheIPaddress(togetherwithitsrelatedsubnetmask)identifiesboththehost
computerandthesubnettowhichitisattached.Whenyoumoveacomputertoadifferent
subnet,theIPaddressmustbechanged.DHCPallowsyoutodynamicallyassignanIPaddress
toaclientfromaDHCPserverIPaddressdatabaseonyourlocalnetwork.
A.1 HowDHCPWorks
1. DHCPDISCOVER:theDHCPclientrequestsconfigurationparametersfromaDHCPserver.At
thisstep,theclientuses0.0.0.0asthesourceand255.255.255.255asthedestination
address.
2. DHCPOFFER:theDHCPserveroffersIPaddressinginformationtotherequestingclient.The
serversendsabroadcastedmessage.
3. DHCPREQUEST:theclientacceptsorrenewsanIPaddressassignment.Theclientaccepts
andbroadcaststheofferedIPaddress.
4. DHCPACK:theDHCPserveracknowledgestheclientsacceptanceofanofferedIPaddress.
NPOL LAB:ConfiguringTCP/IPusingDHCP 2
B. ConfigureTCP/IPsettingsforDHCP
Yourcomputerhastwonetworkcardsasfollows:
LocalAreaConnection:ThisnetworkcardhasastaticIPaddressandisenabledbydefault.Itis
connectedtothenetworkPCaandPCb.
LocalAreaConnection2:Thisnetworkcardisdisabledbydefault.
Inthisexercises,youwillfirstdisableLocalAreaConnection,thenconfigureLocalArea
Connection2forDHCP.
B.1 DisableLocalAreaConnection
1) ToopenNetworkandDialupConnections,clickStart,pointtoSettings,andthenclick
NetworkandDialupConnections.
2) MakesurethatLocalAreaConnectionisconnectedandLocalAreaConnection2is
disabled.
3) RightclickLocalAreaConnection,andthenselectDisable.MakesurethatLocalArea
ConnectionisintheDisabledstate.
B.2 ConfigureLocalAreaConnection2forDHCP
InthisexerciseyouwillconfigureLocalAreaConnectionfirst,andthenenableit.
1) RightclickLocalAreaConnection2,andthenselectProperties
2) FindandclickInternetProtocol(TCP/IP)inthewindow,andthenclickProperties.
3) ClickObtainanIPaddressautomatically,andclickObtainDNSserverIPaddress
automatically,thenclickOK.
NPOL LAB:ConfiguringTCP/IPusingDHCP 3
4) BringupthecommandpromptandtypeipconfigtolearntheIPaddressassignedto
yourcomputerbythetheDHCPserver.WhatisyourIPaddress?Recordtheinformation
sentbytheDHCPserverbelow.
________________________________________________________________________
________________________
ReviewQuestions:
Atthecommandprompttypeipconfig/release,thentypeipconfig.Whathappens?Whatis
thefunctionofipconfig/relase?
Typeipconfig/renew.Whathappens?DidyougetthesameIPaddressas
before?___________.
UseipconfigalltofigureouttheIPaddressoftheDHCPserverandDNSserver?
DHCPServerAddress:
DNSServerAddress:
DiscusstheadvantagesanddisadvantagesofDCHP?
Inawirelessnetwork,shouldyouuseDHCPorstaticIPaddresses?
ShouldyouuseDCHPforyourservers(forexample,awebserver)?Why?Whynot?
C. ARP
C.1 ARPOverview
AddressResolutionProtocol(ARP)isarequiredTCP/IPstandarddefinedinRFC826,"Address
ResolutionProtocol(ARP)."ARPresolvesIPaddressesusedbyTCP/IPbasedsoftwaretomedia
accesscontroladdressesusedbyLANhardware.ARPprovidesthefollowingprotocolservices
tohostslocatedonthesamephysicalnetwork:
NPOL LAB:ConfiguringTCP/IPusingDHCP 4
Mediaaccesscontroladdressesareobtainedbyusinganetworkbroadcastrequest
intheformofthequestion"Whatisthemediaaccesscontroladdressforadevice
thatisconfiguredwiththeenclosedIPaddress?"
WhenanARPrequestisanswered,boththesenderoftheARPreplyandtheoriginal
ARPrequesterrecordeachother'sIPaddressandmediaaccesscontroladdressas
anentryinalocaltablecalledtheARPcacheforfuturereference.
C.2 HowARPresolvesmediaaccesscontroladdressesforlocaltraffic
HardwarebuiltforuseonLANsmustcontainauniqueaddressprogrammedintothedeviceby
themanufacturer.ForEthernetandTokenRingLANhardware,thisaddressisknownasamedia
accesscontroladdress.
Eachmediaaccesscontroladdressidentifiesthedevicewithinitsownphysicalnetworkwitha
6bytenumberprogrammedintoreadonlymemory(ROM)oneachphysicalhardwaredevice,
suchasanetworkadapter.Mediaaccesscontroladdressesaretypicallydisplayedin
hexadecimal(forexample,00AA003F894A).
ThefollowingillustrationshowshowARPresolvesIPaddressestohardwareaddressesforhosts
onthesamelocalnetwork.
Inthisexample,twoTCP/IPhosts,HostsAandB,arebothlocatedonthesamephysical
network.HostAisassignedtheIPaddressof10.0.0.99andHostBisassignedtheIPaddressof
10.0.0.100.
NPOL LAB:ConfiguringTCP/IPusingDHCP 5
WhenHostAtriestocommunicatewithHostB,thefollowingstepsresolveHostB'ssoftware
assignedaddress(10.0.0.100)toHostB'shardwareassignedmediaaccesscontroladdress:
1. BasedonthecontentsoftheroutingtableonHostA,IPdeterminesthattheforwarding
IPaddresstobeusedtoreachHostBis10.0.0.100.HostAthenchecksitsownlocalARP
cacheforamatchinghardwareaddressforHostB.
2. IfHostAfindsnomappinginthecache,itbroadcastsanARPrequestframetoallhosts
onthelocalnetworkwiththequestion"Whatisthehardwareaddressfor10.0.0.100?"
Bothhardwareandsoftwareaddressesforthesource,HostA,areincludedintheARP
request.
3. EachhostonthelocalnetworkreceivestheARPrequestandchecksforamatchtoits
ownIPaddress.Ifahostdoesnotfindamatch,itdiscardstheARPrequest.
4. HostBdeterminesthattheIPaddressintheARPrequestmatchesitsownIPaddress
andaddsahardware/softwareaddressmappingforHostAtoitslocalARPcache.
5. HostBsendsanARPreplymessagecontainingitshardwareaddressdirectlybackto
HostA.
6. WhenHostAreceivestheARPreplymessagefromHostB,itupdatesitsARPcachewith
ahardware/softwareaddressmappingforHostB.
Once the media access control address for Host B has been determined,
Host A can send IP traffic to Host B by addressing it to Host B's media
access control address.
C.3 LAB:CheckingARPCache
Inthisexercise,youwilllearnhowtochecktheARPcacheofyourcomputer.
1. TypearpaataWindowsXPcommandprompttoseeyourcomputerARPcache.Thisis
thelistofdevicesthatyouhavecommunicatedduringthelast2to10minutes.
2. PingacomputerinyournetworkandthenchecktheARPcache.Whathappens?Repeat
thisafewtimes.
3. Typearp/?atthecommandpromptandreadtheoptions.Isitpossibletocreatea
permanententry?How?Answer:_________
_________________________________________