dhcpdWord格式文档下载.docx

上传人:b****1 文档编号:3728887 上传时间:2023-05-02 格式:DOCX 页数:19 大小:23.36KB
下载 相关 举报
dhcpdWord格式文档下载.docx_第1页
第1页 / 共19页
dhcpdWord格式文档下载.docx_第2页
第2页 / 共19页
dhcpdWord格式文档下载.docx_第3页
第3页 / 共19页
dhcpdWord格式文档下载.docx_第4页
第4页 / 共19页
dhcpdWord格式文档下载.docx_第5页
第5页 / 共19页
dhcpdWord格式文档下载.docx_第6页
第6页 / 共19页
dhcpdWord格式文档下载.docx_第7页
第7页 / 共19页
dhcpdWord格式文档下载.docx_第8页
第8页 / 共19页
dhcpdWord格式文档下载.docx_第9页
第9页 / 共19页
dhcpdWord格式文档下载.docx_第10页
第10页 / 共19页
dhcpdWord格式文档下载.docx_第11页
第11页 / 共19页
dhcpdWord格式文档下载.docx_第12页
第12页 / 共19页
dhcpdWord格式文档下载.docx_第13页
第13页 / 共19页
dhcpdWord格式文档下载.docx_第14页
第14页 / 共19页
dhcpdWord格式文档下载.docx_第15页
第15页 / 共19页
dhcpdWord格式文档下载.docx_第16页
第16页 / 共19页
dhcpdWord格式文档下载.docx_第17页
第17页 / 共19页
dhcpdWord格式文档下载.docx_第18页
第18页 / 共19页
dhcpdWord格式文档下载.docx_第19页
第19页 / 共19页
亲,该文档总共19页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

dhcpdWord格式文档下载.docx

《dhcpdWord格式文档下载.docx》由会员分享,可在线阅读,更多相关《dhcpdWord格式文档下载.docx(19页珍藏版)》请在冰点文库上搜索。

dhcpdWord格式文档下载.docx

Thissoftwareisfreesoftware.Atvarioustimesitsdevelopmenthas

beenunderwrittenbyvariousorganizations,includingtheISCandVixie

Enterprises.Thedevelopmentof3.0hasbeenfundedalmostentirelyby

Nominum,Inc.

AtthispointdevelopmentisbeingshepherdedbyTedLemon,andhosted

bytheISC,butthefutureofthisprojectdependsonyou.Ifyouhave

featuresyouwant,pleaseconsiderimplementingthem.

OPERATION

TheDHCPprotocolallowsahostwhichisunknowntothenetworkadmin-

istratortobeautomaticallyassignedanewIPaddressoutofapoolof

IPaddressesforitsnetwork.Inorderforthistowork,thenetwork

administratorallocatesaddresspoolsineachsubnetandentersthem

intothedhcpd.conf(5)file.

Onstartup,dhcpdreadsthedhcpd.conffileandstoresalistofavail-

ableaddressesoneachsubnetinmemory.Whenaclientrequestsan

addressusingtheDHCPprotocol,dhcpdallocatesanaddressforit.

Eachclientisassignedalease,whichexpiresafteranamountoftime

chosenbytheadministrator(bydefault,oneday).Beforeleases

expire,theclientstowhichleasesareassignedareexpectedtorenew

theminordertocontinuetousetheaddresses.Oncealeasehas

expired,theclienttowhichthatleasewasassignedisnolongerper-

mittedtousetheleasedIPaddress.

Inordertokeeptrackofleasesacrosssystemrebootsandserver

restarts,dhcpdkeepsalistofleasesithasassignedinthe

dhcpd.leases(5)file.Beforedhcpdgrantsaleasetoahost,it

recordstheleaseinthisfileandmakessurethatthecontentsofthe

fileareflushedtodisk.Thisensuresthatevenintheeventofa

systemcrash,dhcpdwillnotforgetaboutaleasethatithasassigned.

Onstartup,afterreadingthedhcpd.conffile,dhcpdreadsthe

dhcpd.leasesfiletorefreshitsmemoryaboutwhatleaseshavebeen

assigned.

Newleasesareappendedtotheendofthedhcpd.leasesfile.Inorder

topreventthefilefrombecomingarbitrarilylarge,fromtimetotime

dhcpdcreatesanewdhcpd.leasesfilefromitsin-coreleasedatabase.

Oncethisfilehasbeenwrittentodisk,theoldfileisrenamed

dhcpd.leases~,andthenewfileisrenameddhcpd.leases.Ifthesys-

temcrashesinthemiddleofthisprocess,whicheverdhcpd.leasesfile

remainswillcontainalltheleaseinformation,sothereisnoneedfor

aspecialcrashrecoveryprocess.

BOOTPsupportisalsoprovidedbythisserver.UnlikeDHCP,theBOOTP

protocoldoesnotprovideaprotocolforrecoveringdynamically-

assignedaddressesoncetheyarenolongerneeded.Itisstillpossi-

bletodynamicallyassignaddressestoBOOTPclients,butsomeadminis-

trativeprocessforreclaimingaddressesisrequired.Bydefault,

leasesaregrantedtoBOOTPclientsinperpetuity,althoughthenetwork

administratormaysetanearliercutoffdateorashorterleaselength

forBOOTPleasesifthatmakessense.

BOOTPclientsmayalsobeservedintheoldstandardway,whichisto

simplyprovideadeclarationinthedhcpd.conffileforeachBOOTP

client,permanentlyassigninganaddresstoeachclient.

Wheneverchangesaremadetothedhcpd.conffile,dhcpdmustbe

restarted.Torestartdhcpd,sendaSIGTERM(signal15)tothe

processIDcontainedin/var/run/dhcpd.pid,andthenre-invokedhcpd.

BecausetheDHCPserverdatabaseisnotaslightweightasaBOOTPdata-

base,dhcpddoesnotautomaticallyrestartitselfwhenitseesachange

tothedhcpd.conffile.

Note:

Wegetalotofcomplaintsaboutthis.Werealizethatitwould

beniceifonecouldsendaSIGHUPtotheserverandhaveitreloadthe

database.Thisisnottechnicallyimpossible,butitwouldrequirea

greatdealofwork,ourresourcesareextremelylimited,andtheycan

bebetterspentelsewhere.Sopleasedon'

tcomplainaboutthisonthe

mailinglistunlessyou'

repreparedtofundaprojecttoimplementthis

feature,orpreparedtodoityourself.

COMMANDLINE

Thenamesofthenetworkinterfacesonwhichdhcpdshouldlistenfor

broadcastsmaybespecifiedonthecommandline.Thisshouldbedone

onsystemswheredhcpdisunabletoidentifynon-broadcastinterfaces,

butshouldnotberequiredonothersystems.Ifnointerfacenamesare

specifiedonthecommandlinedhcpdwillidentifyallnetworkinter-

faceswhichareup,eliminatingnon-broadcastinterfacesifpossible,

andlistenforDHCPbroadcastsoneachinterface.

Ifdhcpdshouldlistenonaportotherthanthestandard(port67),the

-pflagmayused.Itshouldbefollowedbytheudpportnumberon

whichdhcpdshouldlisten.Thisismostlyusefulfordebuggingpur-

poses.

Torundhcpdasaforegroundprocess,ratherthanallowingittorunas

adaemoninthebackground,the-fflagshouldbespecified.Thisis

usefulwhenrunningdhcpdunderadebugger,orwhenrunningitoutof

inittabonSystemVsystems.

Tohavedhcpdlogtothestandarderrordescriptor,specifythe-d

flag.Thiscanbeusefulfordebugging,andalsoatsiteswhereacom-

pletelogofalldhcpactivitymustbekeptbutsyslogdisnotreliable

orotherwisecannotbeused.Normally,dhcpdwilllogalloutput

usingthesyslog(3)functionwiththelogfacilitysettoLOG_DAEMON.

Dhcpdcanbemadetouseanalternateconfigurationfilewiththe-cf

flag,oranalternateleasefilewiththe-lfflag.Becauseofthe

importanceofusingthesameleasedatabaseatalltimeswhenrunning

dhcpdinproduction,theseoptionsshouldbeusedonlyfortesting

leasefilesordatabasefilesinanon-productionenvironment.

Whenstartingdhcpdupfromasystemstartupscript(e.g.,/etc/rc),it

maynotbedesirabletoprintouttheentirecopyrightmessageon

startup.Toavoidprintingthismessage,the-qflagmaybespeci-

fied.

TheDHCPserverreadstwofilesonstartup:

aconfigurationfile,anda

leasedatabase.Ifthe-tflagisspecified,theserverwillsimply

testtheconfigurationfileforcorrectsyntax,butwillnotattemptto

performanynetworkoperations.Thiscanbeusedtotesttheanew

configurationfileautomaticallybeforeinstallingit.

The-Tflagcanbeusedtotesttheleasedatabasefileinasimilar

way.

The-tfand-playoptionsallowyoutospecifyafileintowhichthe

entirestartupstateoftheserverandallthetransactionsitpro-

cessesareeitherloggedorplayedbackfrom.Thiscanbeusefulin

submittingbugreports-ifyouaregettingacoredumpeverysooften,

youcanstarttheserverwiththe-tfoptionandthen,whentheserver

dumpscore,thetracefilewillcontainallthetransactionsthatled

uptoitdumpingcore,sothattheproblemcanbeeasilydebuggedwith

-play.

The-playoptionmustbespecifiedwithanalternateleasefile,using

the-lfswitch,sothattheDHCPserverdoesn'

twipeoutyourexisting

leasefilewithitstestdata.TheDHCPserverwillrefusetooperate

inplaybackmodeunlessyouspecifyanalternateleasefile.

CONFIGURATION

Thesyntaxofthedhcpd.conf(5)fileisdiscussedseparately.This

sectionshouldbeusedasanoverviewoftheconfigurationprocess,and

thedhcpd.conf(5)documentationshouldbeconsultedfordetailedrefer-

enceinformation.

Subnets

dhcpdneedstoknowthesubnetnumbersandnetmasksofallsubnetsfor

whichitwillbeprovidingservice.Inaddition,inordertodynami-

callyallocateaddresses,itmustbeassignedoneormorerangesof

addressesoneachsubnetwhichitcaninturnassigntoclienthostsas

theyboot.Thus,averysimpleconfigurationprovidingDHCPsupport

mightlooklikethis:

subnet239.252.197.0netmask255.255.255.0{

range239.252.197.10239.252.197.250;

}

Multipleaddressrangesmaybespecifiedlikethis:

range239.252.197.10239.252.197.107;

range239.252.197.113239.252.197.250;

IfasubnetwillonlybeprovidedwithBOOTPserviceandnodynamic

addressassignment,therangeclausecanbeleftoutentirely,butthe

subnetstatementmustappear.

LeaseLengths

DHCPleasescanbeassignedalmostanylengthfromzerosecondsto

infinity.Whatleaselengthmakessenseforanygivensubnet,orfor

anygiveninstallation,willvarydependingonthekindsofhostsbeing

served.

Forexample,inanofficeenvironmentwheresystemsareaddedfromtime

totimeandremovedfromtimetotime,butmoverelativelyinfre-

quently,itmightmakesensetoallowleasetimesofamonthofmore.

Inafinaltestenvironmentonamanufacturingfloor,itmaymakemore

sensetoassignamaximumleaselengthof30minutes-enoughtimeto

gothroughasimpletestprocedureonanetworkappliancebeforepack-

agingitupfordelivery.

Itispossibletospecifytwoleaselengths:

thedefaultlengththat

willbeassignedifaclientdoesn'

taskforanyparticularlease

length,andamaximumleaselength.Thesearespecifiedasclausesto

thesubnetcommand:

default-lease-time60

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 临时分类 > 批量上传

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2