您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > net-snmp可扩展方案研究
NetSnmpExtensibleagentschemeNetsnmpsupport2extensibleagentschemes:1.ProxyAgent1)Featuresa)UsethestandardSNMPpacketformat.b)EveryProxieddeviceneedsanIPaddressanduniquecommunitystring.c)AproxySNMPsubagentlistensonanon-standardport,andsimplyreceivesrequestsfromthemasteragent.d)Masteragentmakesrequestdispatchdecisionbycommunitystringinrequest.e)Thisfunctionreliesonstaticconfigurationonmasteragentandsubagents.2)Net-SNMPConfigurationProxycreatesamappingbetweenOIDsandSubAgent.(MaybedifferentsubagenthassameOIDtree.)a)Community/ContextMapping*:161SNMPManagerSNMPMasterAgentSNMPSubAgent1SNMPSubAgent2SNMPSubAgent3SNMPSNMPFirewallProxyDevice*:PortCommunityName=Dev1CommunityName=Dev2CommunityName=Dev3MIBMIBMIBMIB*:Port*:PortProxiedDevicesAgentSystemEveryproxieddeviceneedsauniquecommunitystring.MapSNMPv1/v2ccommunitytoanamedSNMPv3context.Allowthe'notConfigUser'(amemberof'notConfigGroup')accessforthesecontexts.RelatethecontexttoIPaddressandOIDofproxieddevice.Inthiscase,Proxymakespassingdecisionthroughcommunitystringincludedinpacketheader.IfthereamarchedcommunityandOID,thentherequestissenttotherelatedIPaddress.Configureproxieddevice.b)RemappingOIDEverythingNet-SNMPimplementsisinthe.iso.org(.1.3)tree.Soyoucouldremaparemotetreetoiso.4(.1.4),andnocontextsorspecialcommunitystringsareneeded.IfyouaremonitoringspecificobjectsbyOIDs,thenyoumight#SkipthissectionifyouaregoingtobeusingSNMPv3toaccesstheproxyagentcom2secnotConfigUserproxy_ipproxy_community#ForIGMPv2remotehost.proxy-Cnctx_remote1-v2c-clocal_communityremote_ip1.1.3#ForIGMPv3remotehost:thisshouldbe1line,withoutthe'\'continuation.proxy-Cnctx_remote2-v3-uMD5DESUser-aMD5-APasswordA\-xDES-XPasswordX-lauthPrivremote_ip2.1.3#Note:Sinceweusedacommonprefixforthecontextname,wejustneedoneaccesslineusingprefixmatching,insteadoftwousingexactmatching.accessnotConfigGroupctx_remoteanynoauthprefixsystemviewnonenone#SkipthissectionifyouaregoingtobeusingSNMPv3toaccesstheproxyagentcom2sec-Cnctx_remote1notConfigUserdefaultremote_community1notcare.REFERENCE:肖容梅华中科技大学20050429《论文:基于AgentX嵌入式系统网管框架的分析与实现》2.Agentx(1998-2000:RFC2741&RFC2742)1)AgentX–RFC2741a)RegisterOIDsSupporttopregisterandrangeregiser.Ifthisregistrationwouldresultinduplicatesubtreesregisteredwiththesamevalueofr.priority,therequest#proxywholetreetosomewhereelseproxy-v2c-cremote_communityremote_ip.1.4.1.3fails.Wheneverthemasteragent’sdispatchingalgorithmdeterminesthattherearemultiplesubtreesthatcouldpotentiallycontainthesameMIBobjectinstances,themasteragentselectsonetouse:themostspecificr.subtree.(overlapping)thesmallervalueofr.priority.(duplicated)b)IndexAllocationItprovidesgenericsupportforsharingMIBconceptualtablesamongsubagentsThemasteragentmaintainsadatabaseofindexobjects(OIDs),and,foreachindex,thevaluesthathavebeenallocatedforit.ItisunawareofwhatMIBvariables(ifany)theindexobjectsrepresent.Fortablesindexedbymultiplevariables,valuesmaybeallocatedforeachindex.Firstrequestallocationofanindex,thenregisterthecorrespondingregion.Theregistrationmayfailbecausesomeothersubagentsessionhasalreadyregisteredthatrowofthetable.Whenindexvalueshaveintrinsicmeaningitisnotexpectedthatsubagentswillallocatetheirindexvalues.Example1:Asubagentimplementsaninterface,andwishestoregisterasinglerowoftheRFC2233ifTable.ItrequestsanallocationfortheindexobjectifIndex,foravaluethathasneverbeenallocated(sinceifIndexvaluesmustbeunique).Themasteragentreturnsthevalue7.Thesubagentnowattemptstoregisterrow7ofifTable,byspecifyingaMIBregionintheagentx-Register-PDUof1.3.6.1.2.1.2.2.1.[1-22].7.Iftheregistrationsucceeds,nofurtherprocessingisrequired.Themasteragentwilldispatchtothissubagentcorrectly.Iftheregistrationfailedwith‘duplicateRegistration’,thesubagentshoulddeallocatethefailedindex,requestallocationofanewindexi,andattempttoregisterifTable.[1-22].i,untilsuccessful.Example2:ThissamesubagentwishestoregisteripNetToMediaTablerowscorrespondingtoitsinterface(ifIndexi).Duetothestructureofthistable,nofurtherindexallocationneedbedone(allocatedinexample1).ThesubagentcanregistertheMIBregionipNetToMediaTable.[1-4].i,ItisclaimingresponsibilityforallrowsofthetablewhosevalueofipNetToMediaIfIndexisi.Example3:Anetworkdeviceconsistsofasetofprocessors,eachofwhichacceptsnetworkconnectionsforauniquesetofIPaddresses.Further,eachprocessorcontainsasubagentthatimplementstcpConnTable.InordertorepresenttcpConnTablefortheentiremanageddevice,thesubagentsneedtosharetcpConnTable.Inthiscase,noindexallocationneedbedoneatall.EachsubagentcanregisteraMIBregionoftcpConnTable.[1-5].a.b.c.d,wherea.b.c.drepresentsanuniqueIPaddressoftheindividualprocessor.EachsubagentisclaimingresponsibilityfortheregionoftcpConnTablewherethevalueoftcpConnLocalAddressisa.b.c.d.2)NET-SNMPConfigurationa)BuildSubagentb)ConfigureMasterAgentWhenyourunthenet-snmpsnmpdmasteragent,inyoursnmpd.conffi
本文标题:net-snmp可扩展方案研究
链接地址:https://www.777doc.com/doc-2883869 .html