版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
DHCP,DNS,SNMPDebashisSahaMISGroup,IIMCalcuttaThursday,May17,20071FirstQuestionHowdoesyourcomputerknowwhichIPtouse?HowdoesyourcomputerknowthatisatIP?Howcanyoutrackyournetwork’shealth?Thursday,May17,20072TheInternetandAddressingAllmachinesontheInternetareaccessedviatheirIPaddressProblem:IPaddressesarehardtorememberandhardtostaticallyassignonlargenetworksSolution:NeedtocomeupwithawaytoautomaticallyassignIPaddressesandatextbasedrepresentationofmachineaddressesinsteadofjust4numbersThursday,May17,20073AddressingSolutionsTwoprotocolshavebeendevelopedtosolvetheseproblemsDHCP–automaticnetworkconfiguration(includingIPaddress)DNS–translatestextualbasednamesintoIPaddressesandviceversaThursday,May17,20074DHCP–DynamicHostConfigurationProtocolThursday,May17,20075DHCPAllowsclientmachinestoreceiveanIPaddress,DNSinformation,etcautomaticallyBeforeDHCPcameintouse,usershadtotypeinallthisinformationbyhand,whichisbad:EasytomistypesomethingwhenenteringbyhandManuallychangingnetworkconfigurationeverytimeyoumoveyourlaptopisapainBootpresolvedsomeoftheseissues…andDHCPstillusesthesameportasbootpThursday,May17,20076PurposeofDHCP FromRFC-2131(theInternetstandard):TheDynamicHostConfigurationProtocol(DHCP)providesaframeworkforpassingconfigurationinformationtohostsonaTCP/IPnetwork.DHCPconsistsoftwocomponents:aprotocolfordeliveringhost-specificconfigurationparametersfromaDHCPservertoahostandamechanismforallocationofnetworkaddressestohosts.Thursday,May17,20077DHCPfunctionalgoalsAhostwithoutavalidIPaddresslocatesandcommunicateswithaDHCPserverADHCPserverpassesconfigurationparameters,includinganIPaddress,tothehostTheDHCPservermaydynamicallyallocateaddressestohostsandreuseaddressesHostscandetectwhentheyrequireanewIPaddressUnavailabilityofDHCPserverhasminimaleffectonoperationofhostsThursday,May17,20078DHCP:BasicsAclientleasesanIPaddressfromaDHCPserverforagivenamountoftimeWhenleaseexpires,theclientmustaskDHCPserverforanewaddress(clientsattempttorenewleaseafter50%oftheleasetimehasexpired)Typicalleasesmaylastforfrom30secondsto24hours,orevenlonger.Thursday,May17,20079WhatdoesDHCPdo?Providesprotocolstack,applicationandotherconfigurationparameterstohostsEliminatesneedforindividual,manualconfigurationforhostsIncludesadministrativecontrolsfornetworkadministratorsBackwardcompatiblepacketformatforBOOTPinteroperation(RFC1542)Cancoexistwithhoststhathavepre-assignedIPaddressesandhoststhatdonotparticipateinDHCPThursday,May17,200710DesignGoalsEliminatemanualconfigurationofhostsPreventuseofanyIPaddressbymorethanonehostShouldnotrequireaserveroneverysubnetAllowformultipleDHCPserversProvideamechanism,notapolicyProvidethesameconfiguration-includingIPaddress-toahostwheneverpossibleThursday,May17,200711WhatcanyoudowithDHCPPlug-and-playMovedesktopPCsbetweenofficesRenumberOtherrestructuring-changesubnetmasksMobileIP-laptopsMovingequipment-cartableThursday,May17,200712WhatDHCPdoesn’tdoSupportmultipleaddressesperinterfaceInformrunninghostthatparametershavechangedPropagatenewaddressestoDNSSupportinter-servercommunicationProvideauthenticatedmessagedeliveryConfigureroutersandothernetworkequipmentDesignnetworkaddressingplanDetermineotherconfigurationparametersLocateotherserversThursday,May17,200713DHCP:MessagesOverviewSeveralmessagesaresentbackandforthbetweenaclientandtheDHCPserverbeforeitcansuccessfullyobtainanIPaddressThursday,May17,200714DHCP:DISCOVERHardcodingtheaddressesofDHCPserverskindofdefeatsthepurposeofautomaticconfigurationSolution:AclientusingDHCPwillbroadcastaDISCOVERmessagetoallcomputersonitssubnet(addr55)tofigureouttheIPaddressofanyDHCPserversMostroutersareconfiguredtopassthisrequestwithinthecampusorenterpriseThursday,May17,200715DHCP:OFFER(Optionally)sentfromserverinresponsetoaDISCOVERContainsanIPaddress,otherconfigurationinformationaswell(subnetmask,DNSservers,defaultgateway,searchdomains,etc)NotethatallDHCPserversthatreceiveaDISCOVERrequestmaysendanOFFER;sinceaclienttypicallydoesnotneedmorethanoneIPaddress,moremessagesneededtozeroononeIPThursday,May17,200716DHCP:REQUESTSentbyclienttorequestacertainIPaddressUsuallytheonesentbyanOFFER,butalsousedtorenewleases.AlsocanbesenttotrytogetsameaddressafterarebootThismessageisbroadcastMostOSsbydefaultwillsendaREQUESTforthefirstOFFERtheyreceive–thismeansthatifthereisarogueDHCPserveronyoursubnet,mostclientswillignoretheOFFERsfromthecampusDHCPservers(sincetheOFFERfromtherogueservergetstotheuser’sPCfirst)!Thursday,May17,200717DHCP:ACK/NACKSentbyserverinresponsetoaREQUESTACK:Requestaccepted,clientcanstartusingtheIPitREQUESTedNACK:Somethingiswrongwiththeclient’sREQUEST(forexampletheyrequestedanIPaddressthey’renotsupposedtohave)Thursday,May17,200718DHCP:RELEASESentbyclienttoendaleaseNotstrictlyrequired,butisthe“polite”thingtodoifdonewiththeIP(couldjustlettheleaseexpire)SomeclientsmaynotsendRELEASEsinanattempttokeepthesameIPaddressforaslongaspossibleThursday,May17,200719DHCP:BigPictureThursday,May17,200720SummaryDHCPworkstodayasatoolforautomaticconfigurationofTCP/IPhostsItisanopenInternetstandardandinteroperableclientimplementationsarewidelyavailableProvidesautomationforroutineconfigurationtasks,oncenetworkarchitecthasconfigurednetworkandaddressingplanOngoingworkwillextendDHCPwithauthentication,DHCP-DNSinteractionandinter-servercommunicationThursday,May17,200721DHCP:ConclusionEfficientwayofassigningcomputersIPaddressesanddeliveringconfigurationinformationtothosecomputersDoesnotsolveotherproblemofaddressing–thatIPaddressesarehardtorememberThursday,May17,200722IETFstandardsFormalprocessfordevelopment,reviewandacceptanceofTCP/IPprotocolsuitestandardsInitialspecificationspublishedasInternetDrafts(I-Ds)AcceptedspecificationspublishedasRequestforComments(RFCs)Thursday,May17,200723ProtocolstatusDHCPhasbeenacceptedasaDraftStandard;thespecificationsarepublishedin:RFC2131:DynamicHostConfigurationProtocolRFC2132:DHCPOptionsandBOOTPVendorExtensionsSeveraladditionaloptionsareindevelopmentThursday,May17,200724ImplementationstatusDHCPisanopenstandard,withfreelyavailablespecificationsCanbe(andhasbeen)implementedentirelyfromthespecificationCommercialimplementationsarewidelyavailableNon-commericalimplementationsarealsoavailableThursday,May17,200725DHCPResourcesCompilationofDHCP-relatedWWWlinksandotherinformation:://DHCPFAQ(maintainedbyJohnWobus)mailinglist(adminrequeststo)IETFinformationcanberetrievedfrom:://I-DsandRFCscanalsoberetrievedfrom:Thursday,May17,200726DNS–DomainNameSystemThursday,May17,200727SecondQuestionHowdoesyourcomputerknowwhichIPtouse?HowdoesyourcomputerknowthatisatIP?Howcanyoutrackyournetwork’shealth?Thursday,May17,200728DomainNameSystem(DNS)ThefirstIPnetworksdistributedhostfilesonaregularbasisThisbecameaburdenandanautomateddistributedsolutionwasneededIPAddressesaregreatforcomputersIPaddressincludesinformationusedforrouting.IPaddressesaretoughforhumanstoremember.IPaddressesareimpossibletoguess.everguessedatthenameofaWWWsite?Thursday,May17,200729HostnamesDNSisbornDomainnamescompriseahierarchysothatnamesareunique,yeteasytoremember.ThedomainnamesystemisusuallyusedtotranslateahostnameintoanIPaddress.Ex:<->IP81(whichonewouldyouratherremember?)Thursday,May17,200730DNS:BasicsHierarchicalnamespaceDistributedsystem–veryfewcoreserversStoresotherinformationthansimple
hostname<->IPmappingsRequest/responseprotocolThursday,May17,200731DNSHierarchyeducomorginrpialbanyaciimcalThursday,May17,200732HostnamestructureEachhostnameismadeupofasequenceoflabelsseparatedbyperiods.Eachlabelcanbeupto63charactersThetotalnamecanbeatmost255characters.Examples:
Thursday,May17,200733DomainNameThedomainnameforahostisthesequenceoflabelsthatleadfromthehost(leafnodeinthenamingtree)tothetopoftheworldwidenamingtree.Adomainisasubtreeoftheworldwidenamingtree.Thursday,May17,200734HierarchicalNamingcomedugovmilnetorgusarpacolordaocsfoobarThursday,May17,200735Topleveldomainsedu,gov,com,net,org,mil,…Countrieseachhaveatopleveldomain(2letterdomainname).Suchas.in,.uk,.it,etc.Newtopleveldomainsinclude:.Thursday,May17,200736DomainNamingSystemeducomharvard…
mithbseewwwphysicscisco…
yahoonasa…
nsfarpa…
navyacm…
ieeegovmilorgnetukfrThursday,May17,200737DNS:ArchitectureDNSserversareresponsibleforoneormoredomainsofanylevel“Rootservers”aremaintainedthroughouttheworld(oneisinPaloAlto)andareresponsibleforallofthetop-leveldomainsWhenyouregisteradomain,anentryforthatdomainisaddedtotheappropriaterootserverOwnersofeachregulardomainorsubdomainmaintain(oroutsource)theirownDNSserverscontainingthecorrectinformationThursday,May17,200738NameServersPartitionhierarchyintozoneseducomprinceton…
mitcseeux01ux04physicscisco…
yahoonasa…
nsfarpa…
navyacm…
ieeegovmilorgnetukfrRootnameserverPrincetonnameserverCisconameserverCSnameserverEEnameserver……EachzoneimplementstwoormorenameserversPrimarysecondaryThursday,May17,200739HierarchicalAdministration-“Zones”arpacomingovmilnetorgusarpaaciimcalwwwThursday,May17,200740Administration-ZonesAzoneisasubtreeoftheDNStreethatisindependentlymanagedSecond-leveldomains(“ac.in”)areusuallyanindependentzoneMostsub-domains(“”)arealsoindependent.
Azonemustprovidemultiplenameservers.Thisserverrecordsthemembersinthedomain.Youtypicallyneedaprimarynameserverandoneormoresecondarynameservers.Secondaryretrievesinformationfromprimaryusingazonetransfer.Thursday,May17,200741ResolvinganaddresswantstoknowaboutACDEGBFHHost“A.C.D”asks“B.C.D”(thelocalnameserver)toresolve“F.E.D”NameserversThursday,May17,200742ResolvinganaddressB.C.Ddoesn’tknowtheanswer.Itwantstoasktheprimarydomainserverforthe“E.D”domain,soitaskstheparentofthe“B.C”domain(“D”inthisexample)toresolve“E.D”.DasksH,therootserver.Hdoesn’tknowtheanswer,butit’sthetop-leveldomainandknowsthat“G.E.D”istheprimarydomainserverforthe“E.D”domainB.C.DnowknowstheprimarydomainserverfortheE.Ddomain,andcannowask“G.E.D”about“F.E.D”Thursday,May17,200743DomainserversWhatkindofrecordscanberequestedforagivendomain?AddresstranslationCachinginformationMailserverinformationAuthoritativenameserverinformationHowisthisdatarequested?Eachrecordhasatypeandcertaindataassociatedwithit–clientsrequestrecordsofacertaintypefromaserverThursday,May17,200744DNSOrganizationDistributedDatabaseTheorganizationthatownsadomainnameisresponsibleforrunningaDNSserverthatcanprovidethemappingbetweenhostnameswithinthedomaintoIPaddresses.So-somemachinerunbyRPIisresponsibleforeverythingwithinthedomain.Thursday,May17,200745DNSDBDNSDBDNSDistributedDatabaseThereisoneprimaryserverforadomain,andtypicallyanumberofsecondaryserverscontainingreplicateddatabases.DNSDBAuthoritativeDNSDBReplicasDNSserverThursday,May17,200746DNSClientsADNSclientiscalledaresolver.Acalltogethostbyname()ishandledbyaresolver(typicallypartoftheclient).MostUnixworkstationshavethefile/etc/thatcontainsthelocaldomainandtheaddressesofDNSserversforthatdomain.Thursday,May17,200747/etc/domainThursday,May17,200748nslookupnslookupisaninteractiveresolverthatallowstheusertocommunicatedirectlywithaDNSserver.nslookupisusuallyavailableonUnixworkstations.(digandhostarealsoDNSclients).Thursday,May17,200749DNSServersServershandlerequestsfortheirdomaindirectly.ServershandlerequestsforotherdomainsbycontactingremoteDNSserver(s).Serverscacheexternalmappings.Thursday,May17,200750Server-ServerCommunicationIfaserverisaskedtoprovidethemappingforahostoutsideit’sdomain(andthemappingisnotintheservercache):Theserverfindsanameserverforthetargetdomain.TheserverasksthenameservertoprovidethehostnametoIPtranslation.Tofindtherightnameserver,useDNS!Thursday,May17,200751DNSDataDNSdatabasescontainmorethanjusthostname-to-addressrecords:Nameserverrecords NSHostnamealiases CNAMEMailExchangers MXHostInformation HINFOThursday,May17,200752TheRootDNSServerTherootserverneedstoknowtheaddressof1st(andmany2nd)comorgjpalbanyrpiThursday,May17,200753ServerOperationIfaserverhasnoclueaboutwheretofindtheaddressforahostname,asktherootserver.Therootserverwilltellyouwhatnameservertocontact.Arequestmaygetforwardedafewtimes.Thursday,May17,200754DNSMessageFormatThursday,May17,200755DNSMessageHeaderqueryidentifierflags#ofquestions#ofRRs#ofauthorityRRs#ofadditionalRRs16bitfieldsResponse}Thursday,May17,200756MessageFlagsQR:Query=0,Response=1AA:AuthoritativeAnswerTC:responsetruncated(>512bytes)RD:recursiondesiredRA:recursionavailablercode:returncodeThursday,May17,200757RecursionArequestcanindicatethatrecursionisdesired-thistellstheservertofindouttheanswer(possiblybycontactingotherservers).Ifrecursionisnotrequested-theresponsemaybealistofothernameserverstocontact.Thursday,May17,200758QuestionFormatName:domainname(orIPaddress)Querytype(A,NS,MX,…)Queryclass(1forIP)Thursday,May17,200759ResponseResourceRecordDomainNameResponsetypeClass(IP)Timetolive(inseconds)LengthofresourcedataResourcedataThursday,May17,200760UDP&TCPBothUDPandTCPareused:TCPfortransfersofentiredatabasetosecondaryservers(replication).UDPforlookupsIfmorethan512bytesinresponse-requestorresubmitsrequestusingTCP.Thursday,May17,200761LotsmoreThisisnotacompletedescription!Ifinterested-lookat:RFC1034:DNSconceptsandfacilities.RFC1035:DNSimplementationandprotocolspecification.playwithnslookup.LookatcodeforBIND(DNSservercode).Thursday,May17,200762NametoAddressConversionThereisalibraryoffunctionsthatactasDNSclient(resolver).youdon’tneedtowriteDNSclientcodetouseDNS!WithsomeOSsyouneedtoexplicitlylinkwiththeDNSresolverlibrary:-lnsl(nslis“NameServerLibrary”)Suns(Solaris)needthis!Thursday,May17,200763DNSlibraryfunctionsgethostbynamegethostbyaddrgethostbyname2IPV6!Thursday,May17,200764gethostbynamestructhostent*gethostbyname(constchar*hostname);structhostentisdefinedin:#include<>Thursday,May17,200765structhostentstructhostent{ char*h_name; char**h_aliases; inth_addrtype; inth_length; char**h_addr_list;};officialname(canonical)othernamesAF_INETorAF_INET6addresslength(4or16)
arrayofptrstoaddressesThursday,May17,200766hostentpictureh_nameh_aliasesh_addrtypeh_lengthh_addr_listOfficialNamealias1alias2nullIPaddress1IPaddress2nullThursday,May17,200767WhichAddress?Onsuccess,gethostbynamereturnstheaddressofahostentthathasbeencreated.hasanarrayofptrstoIPaddressesUsuallyusethefirstone:#defineh_addrh_addr_list[0]Thursday,May17,200768gethostbynameanderrorsOnerrorgethostbynamereturnnull.Gethostbynamesetstheglobalvariableh_errnotoindicatetheexacterror:HOST_NOT_FOUNDTRY_AGAINNO_RECOVERYNO_DATANO_ADDRESSAlldefinedinThursday,May17,200769Gettingattheaddress:
char**h_addr_list;h=");= *(h->h_addr_list[0]);Thiswon'twork!!!!
h_addr_list[0]isachar*!Thursday,May17,200770UsingmemcpyYoucancopythe4bytes(IPv4)directly:h=");, h->h_addr_list[0],sizeof(struc
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 农村土地整治挖掘机施工协议
- 社会福利彩钢板安装合同样本
- 学校药品器材安全警示标识
- 实验室事故报告流程
- 电子产品生产资产管理指南
- 2024年艺人演艺事业发展规划3篇
- 油气开采挖机设备租赁合同
- 高铁工程预应力施工协议
- 轨道车物料成本优化
- 铁路建设临时用电服务合同
- 理性思维作文素材800字(通用范文5篇)
- (完整)标前协议
- 房产公司15周年年会主持词5篇
- T-SZWA 001-2017 高分子益胶泥
- GB/T 10002.3-2011给水用硬聚氯乙烯(PVC-U)阀门
- 房地产估计第八章成本法练习题参考
- 《社会主义核心价值观》优秀课件
- DB11-T1835-2021 给水排水管道工程施工技术规程高清最新版
- 《妊娠期糖尿病患者个案护理体会(论文)3500字》
- 幼儿园绘本故事:《十二生肖》 课件
- 甘肃省庆阳市各县区乡镇行政村村庄村名明细及行政区划代码
评论
0/150
提交评论