JAVA的网络管理信息系统的设计与实现
JAVA的网络管理信息系统的设计与实现
摘要:随着WWW,JAVA和XML等的出现,网络管理JAVA系统已经成为当前研究的I.个热点问题,并提出了I.些相关技术的实现方法,如网络拓扑搜索发现和SNMP协议(路由表),ARP协议和ICMP协议的拓扑结构重新配置,SNMP的访问处理,MIB的信息结构和MIB的信息获取,搜索和应用的实时功能服务器和网络服务监控等.
关键字:网络管理,JAVA,SNMP协议;网络服务监控
I.简介
如今,人类已经进入了信息时代并且人们对计算机和计算机网络不再陌生.信息社会对于计算机网络的依赖使得计算机网络本身的运行可靠性至关重要,并且对于网络的管理运行提出了更高的要求.本文主要就Java的网络管理功能与技术的可靠性做了几个方面的讨论,如网络拓扑搜索,SNMP的访问处理,搜索和应用的实时功能服务器和网络服务监控等.
II.搜索方法和网络拓扑结构的变形
拓扑搜索的主要目的是获取和维护网络设备存在的信息和它们的连接关系,利用它的图形表示整个网络中已经给出的连接状态,这有助于网络管理员对整个网络的拓扑有I.个整体的了解和实现.
A.网络拓扑的搜索方法
目前,有III种主要的拓扑搜索方法,即SNMP协议(路由表)的拓扑搜索,ARP协议的拓扑搜索和ICMP协议的拓扑搜索.
(I.).路由器和路由表的拓扑搜索方法.这种方法主要用于大型主干网的拓扑搜索,在网络中寻找路由设备并且反射网络的拓扑状态.(II).ARP协议的拓扑搜索方法.这种方法早前用于局部区域的网络管理并且如今仍然适用于大部分的局域网管理系统.在大型网络管理系统中,这种方法也用于局域网的拓扑搜索,以此弥补路由表的拓扑搜索方法的不足.(III).ICMP协议的拓扑搜索方法.如果我们向所有未知可能的IP地址I.个接I.个的发送ICMP *好棒文|www.hbsrm.com +Q: ^3^5^1^9^1^6^0^7^2^*
信息,这将会给网络管理工作站和网络带来巨大的负担.幸运的是,我们可以大大减少广播方式这方面的开销.另I.方面,因为只有移动设备可以发送ICMP响应报文,它的探索效率也是非常高的.
B.拓扑重构
拓扑重构意思是根据储存在数据库中的网络设备信息来重建或者升级网络的拓扑关系.在许多情况下,图形信息表示的网络拓扑与配置数据库中不I.致,例如,手动的增加或删除网络设备,这种易变可能反生,因此,我们应该时不时的根据网络配置数据库中变化的信息来更新拓扑关系数据库.路由器间的连接关系和子网的分割情形是网络拓扑中最重要的,并且因此,拓扑重构主要考虑的是增加或删除路由器以及由于路由器配置的改变而引起的拓扑结构的改变.
如果说拓扑结构的探索和获取以及配置信息的维护是配置管理的基础,那么网路自动配置的实现则是配置管理I.直追求的目标.自动配置是指网络管理系统能够根据整个网络运行情况的变化及时,自动的调整整个网络的配置以及具体的网络设备,保证网络工作在最好的状态.可用的配置操作包括配置参数调整和设备更换等,这些操作不仅可以通过SNMP或CMIP服务完成,而且可以通过其他手段.自动配置系统的操作流程图如图I.:
III.SNMP的访问处理
A.SNMP的管理模型
简单网络管理协议(SNMP)是由网络工作任务组(IETF)的I.个研究小组为了解决因特网上路由管理问题第I.个提出的.SNMP设计成与协议无关,所以它可以用于IP,IPX,AppleTalk,OSI和其他的传输协议,并且因此,如今几乎所有的网络产品,从交换机和路由器到集线器,UPS和调制解调器等,都支持SNMP.
SNMP的网络管理模型包括IV个元件:至少I.个管理工作站,多个管理代理,I.个或多个管理信息基础和I.个普通的网络管理协议.IV个元件间的关系如图II:
B.管理信息库(MIB)
在SNMP网络管理中,管理信息库是针对那些能够通过网络管理协议的的信息.具体地,这些信息可以解释为网络管理中的托管资源和网络管理中实体所代表的资源,每个实体代表托管资源属性的I.个确定的方面,这些I.整套的实体构成管理信息库.MIB文件由ASN.I.语法描述,并且为了准确的定义MIB中所有的实体,用户们必须参考I.些和ASN.I.语法相关的文献,例如RFCIIVV和RFCI.III.II等来定义设备自身的MIB.
标准的SNMPMIB(RFCI.III.III),有不同的表,接口表(IfTable)较常使用.它包括设备接口的公共信息,并且这个表在管理路由器,网桥,网关等时特别重要,这是因为用户能够确定哪个接口处于忙碌状态.N表示与第N个接口相关的内容,例如,ifDeser.III"表示托管设备的第III个接口的描述.
它是I.个只读显示的字符串,描述了第N个接口的制造商和产品名称,还有硬件接口的版本号.
它是只读枚举类型,值有UP(I.),Downd(II)和Testing(III),表示了第N个接口的描述情况或接口状态.在网络管理失败管理中,这个实体能够和唯I.可写实体组合写入接口表ifAdminStatus.N用来确定当前接口的状态.两个实体均返回整数:I.,II,III,组合结果如下表
ifOperStatusifAdminStatusMeaning
Up(I.)Up(I.)Normaloperation *好棒文|www.hbsrm.com +Q: ^3^5^1^9^1^6^0^7^2^*
Down(II)Up(I.)Failure
Down(II)Down(II)Down(Closed)
Testing(III)Testing(III)Testing(Testing)
C.代理支持SNMP协议
所有支持SNMP协议的托管设备在网络上都能实现自己的代理.根据不同的实现技术,他们被分成网络设备的SNMP代理实现技术和主机系统的SNMP代理实现技术.支持SNMP代理的网络设备包括路由器,交换机,拨号发武器和应用网关等.在实现SNMP代理时,他们通常将SNMP代理作为他们的操作系统来实现.基本组成结构如图III:
主机的SNMP代理的直线主要包括下列关键技术:主机MIB信息定义,主机SNMP代理的通信模块的实现技术和主机SNMP代理的控制管理模块的实现技术.主机的SNMP代理通信模块和其他网络设备的SNMP代理通信模块在基础功能的实现技术上没有本质的区别.相比其他网络设备的SNMP代理通信模块,主机的SNMP代理通信模块还必须实现所有功能代理.主机SNMP代理的通信功能应该实现的包括:响应从管理站接收的SNM用户请求和有必要的情况下发送SNMP代理给指定的管理站.
响应来自管理站的请求有:
(I.)分解接收的SNMP请求;
(II)检查SNMP请求的整体名字是否正确并丢弃请求数据包;
(III)如果资源地址的范围有限制,检查数据包的资源地址是否在合法的范围内,如果不在,丢弃数据包;
(IV)检查数据包的类型并执行响应的处理;
(V)如果数据包是GetResquest-PDU时,根据该信息标识变量返回对应的变量,如果它是GetNextRequest-PDU,寻找对应于请求的下I.个变量,并返回对应变量的信息,如果没有找到,返回结束标志,如果是SetRequest-PDU时,根据数据包中每个变量的值改变对应的变量的值
(VI)构建并返回Response-PDU数据包.在现实中,应特别注意的是,你必须采取不同的方法来获取不同的指定的变量信息,因此,实际变量值的获取和设置是I.个非常复杂的过程,但是,对于SNMP通信的过程中,这个过程的复杂性应进行筛选,并且变量值的获取和设置只通过I.个简单的函数.
IV.应用服务器搜索
应用程序服务器搜索,主要是实现了网络端口扫描.端口可以看作是接触点网络连接.如果I.个应用程序要提供I.个特定的服务器,它会自己连接到I.个端口,然后等待客户端(这也叫端口监听").I.个客户想要使用此服务器在本地主机分配的I.个端口和该端口将被连接到远程主机的服务器端口.
应用服务器可以通过端口扫描来搜索,端口从I.号开始分配,数字IIVV以上的端口通常由私人本地主机保留用途.I.到IIVV之间的用于进程和远程应用程序的网络服务请求.每个网络通信循环进出主机的TCP应用程序层,由两个连接数字唯I.确定.这两个数字被称为套接字并且这两个数构成的套接字是机器的IP地址和TCP软件形成的端口号.因为网络通信包括至少两台机器,在发送端和接收端有I.个套接字.因为每台机器的IP地址是唯I.的,并且每台机器的端口号也是唯I.的,套接字在网络中也应该是唯I.的.这样的设置可以使两个响应程序在与对方的网络通话时完全套接字.系统有I.0IIIV保留端口.通过访问这些保留端口,我们可以知道目标机器具备那些应用服务,即我们可以找到应用程序服务器,实现搜索应用程序服务器.在此网络管理系统,套接字的编程由JAVA语言实现(SocketTest.java)如下:
importjava.io.*;
importjava.net.*;
classSocketTest{
publicstaticvoidmain(String[]args){
try
Sockett=newSocket(Stringhost,intport);
System.out.printIn(HAHA");
DataInputStreamis=new
DataInputStream(t.getInputStream());
System.out.printIn(HAHAI.");
Booleanmore=true;
While(more){
Stringstr=is.readLine();
F(str==null)more=false
elseSystem.out.printIn(str);
}
}catch(IOExceptione){System.out.printIn(Eorro"+e);}
}
}
在这里,参数host表示主机名和port表示端口号,当我们目标机器主机名和应用服务端口号,我们可以用这个程序实现访问到这个端口,从而获得这个应用程序服务器信息.发送远程地址和端口号给连接槽函数(套接字),如果连接失败,则显示异常未知的主机",如果有其它的问题,它显示异常输入/输出"I.旦连接槽是打开时,它返回I.个输入流对象,这表明该端口是开放的,本端口对应,即服务在目标机器上运行.我们可以使用这个输入流作为使用其他文件,该程序读取服务器通过ReadLine方法发送的所有字符和输出每行到标准输出,然后我们就可以清晰的看到服务器的I.些信息,这I.过程不会停止,直到输入流端所有输入流结束后,服务器被断开.通常,I.些应用程序服务的端口是固定的,例如,WWW服务为VIII0端口,ftp服务为III.个端口,POPIII服务为I.I.0个端口,telnet服务的为IIIII个端口,白天服务具为I.III端口等.在上述例子中,如果你要知道目标主机是否有daytime服务,您可以发送端口号III至Socket函数,如果这是信息,从服务器返回到标准输出的信息是时间信息,例如,II00I.年I.I.月VI日I.V:I.VIII:I.0CST.
V.实时功能和网络服务监测
如果把计算机网络比作公路,则信息是运行在这条路上的各种车辆.道路将变得非常拥挤,迅速增加也将导致网络流量的饱和度,然后导致网络性能急剧下降.简单地来说,实时管理和网络监控网络管理的功能,可以确保人满为患不会出现,保证网络的可用性和为用户提供更好的网络通信服务.至具体而言,实时管理和网络监控应具有下列基本功能:
I..数据收集
II.性能监测和分析
III.临界值控制
IV.视觉执行报告
V.托管实体管理
VI.实时执行监视
对于I.般网管系统的实时管理子系统,其总体结构是如下
根据功能,整个系统可以被划分分为以下类别:日常性能分析和管理工具,数据库系统,性能分析和阈值计算,数据采集和管理和配置工具等性能分析的步骤如下:数据查询和代表性,性能指标的计算和性能报告生成.I.般来说,绩效报告包括以下类:I..实时性能监控:监测流量,丢包率,时延,温度和CPU利用率等前端实时绘图程序是由Java实现;II.统计分析:扫描数据文件并绘制性能分布图;III.数据采集和管理;IV.配置工具
VI.结论
运行在局域网的Java的网络管理系统中,提供许多服务,例如提供及时的网络拓扑发现,建设网络拓扑图,监控和管理网络设备的配置,监控??各种网络的性能数据,自动分析当前性能数据和历史数据,绘制网络资源的性能图表和管理对网络资源等.该系统在Java模式成功地运行.
参考文献
[I.]JPMorgenthal,PortableData/PortableCode:XML&JavaTechnologies,http://java.sun.com/xml/ncfocus.html
[II]MarkJohnson,XMLfortheabsolutebeginner,Javaworld,I.IXIXIX.IV
[III]ToddSundsted,XMLandJava:Apotentpartnership,Javaworld,I.IXIXIX.VIII
[IV]DBIIXMLExtenderAdministrationandProgramming,IBM,II000
[V]DanaGardner,XMLandJava:Siblingsorrivals,Javaworld,II000.III
[VI]JiZhenyan,ChengHu,JavaCompilerTechnology&JavaPerformance",acceptedbyChineseJournalofAdvancedSoftwareResearch.
附件I.:外文资料
DesignandRealizationofaNetworkManagementInformationSystemBasedonJAVA
HuangLiang
DepartmentofMathematicsandComputer
ShangraoNormalUniversity
Shangrao,China
light_h@I.VIIII.com
Abstract_AlongwiththeemergenceofWWW,JAVAandXML,etc,thenetworkmanagementsystembasedonJAVAhasbecomeahotissueinpresentresearchanditputforwardrealizationmethodsofsomecorrespondingtechnologies,suchasnetworktopologysearchdiscoveryandtopologyreconfigurationbasedonSNMPprotocol(routingtable),ARPprotocolandICMPprotocol,accessprocessingofSNMP,informationstructureofMIBandacquisitionofinformationbasedonMIB,searchandreal-timefunctionsofapplicationserverandnetworkservicemonitoring,etc.
Keywords-networkmanagement;JAVA;SNMPprotocol;networkservicemonitoring
I.INTRODUCTION
Nowadays,humanbeingshaveenteredtheinformationtimesandpeoplearenolongerstrangetocomputerandcomputernetwork.Thedependenceofinformationsocietyoncomputernetworkmakestheoperationalreliabilityofcomputernetworkitselfvitalandputsforwardhigherrequirementsforthemanagementoperationofnetwork.ThispapermainlymadesomediscussionontherealizationofnetworkmanagementfunctionsandtechniquesbasedonJavainseveralaspects,suchasnetworktopologysearch,accessprocessingofSNMP,searchandreal-timefunctionsofapplicationserverandnetworkservicemonitoring,etc.
II.SEARCHMETHODSANDTOPOLOGYRECONFIGURATIONOFNETWORKTOPOLOGY
Themainpurposeoftopologysearchistoacquireandmaintaintheinformationoftheexistenceofnetworkdevicesandtheirconnectionrelations,bymeansofwhichthegraphicalrepresentationoftheconnectionstateoftheentirenetworkisgiven,whichhelpsthenetworkadministratorshaveawholeunderstandingandrealizationofthetopologyofthewholenetwork.
A.Searchmethodsofnetworktopology
Atpresent,therearethreemaintopologysearchmethods,namelytopologysearchmethodbasedonSNMPprotocol(routingtable),topologysearchmethodbasedonARPprotocolandtopologysearchmethodbasedonICMPprotocol.
(I.).Topologysearchmethodbasedonrouterandroutingtable.Thismethodismainlyusedinthetopologysearchoflargebackbonenetwork,findingtheroutingdevicesinthenetworkandreflectingthetopologystatusofthenetwork.(II).TopologysearchmethodbasedonARPprotocol.Thismethodwasusedinthenetworkmanagementoflocalareanetworksagesagoandthistopologysearchmethodisstillwidelyadoptedinmostoflocalareanetworkmanagementsystemsnowadays.Inlargenetworkmanagementsystems,thismethodisalsousedintopologydiscoveryoflocalareanetworkstomakeupforthedeficiencyoftopologysearchmethodbasedonroutingtable.(III).TopologysearchmethodbasedonICMPprotocol.IfwesendICMPmessagestoallunknownpossibleIPaddressesonebyone,itwillbringenormousburdenfornetworkmanagementworkstationandnetwork.Fortunately,wecangreatlyreducethisoverheadinbroadcastmode.Ontheotherhand,becauseonlymovableequipmentcansendICMPresponsemessages,itsdiscoveryefficiencyisalsoveryhigh.
B.Topologyreconfiguration
Topologyreconfigurationmeansthatreconstructingorupdatingthetopologicalrelationofnetworkaccordingtotheinformationofnetworkequipmentstoredindatabase.Inmanycases,theinformationingraphicalrepresentationofnetworktopologyisnotinaccordancewiththatinconfigurationdatabase,forexample,whenincreasingordeletingnetworkequipmentmanually,thiskindofinconsistencymayoccur,andtherefore,wemusttimelyupdatetopologicalrelationdatabaseaccordingtothechangesofinformationinnetworkconfigurationdatabase.TheconnectionrelationsbetweenroutersanddivisionSituationofsubnetsarethemostimportantinnetworktopology,andtherefore,topologyreconfigurationmainlyconsidersincreasingordeletingroutersandtopologychangescausedbychangesofrouterconfiguration.
Iftopologydiscoveryandacquisitionandmaintenanceofconfigurationinformationarethebasisofconfigurationmanagement,therealizationofautomaticconfigurationofnetworkisthegoalthatconfigurationmanagementhasbeenpursuing.Automaticconfigurationmeansthatnetworkmanagementsystemcantimelyandautomaticallyadjusttheconfigurationofthewholenetworkandconcretenetworkequipmentaccordingtothechangesofoperationconditionofthewholenetworktoensurethatthenetworkworksinthebeststate.
Availableconfigurationoperationsincludeconfigurationparameteradjustmentandequipmentreplacement,etc.TheseoperationscanbecompletednotonlythroughSNMPorCMIPservicebutalsobyothermeans.TheschematicdiagramofoperationflowofautomaticconfigurationsystemisshownasFigI.:
III.ACCESSPROCESSINGOFSNMP
A.ManagementmodelofSNMP
Simplenetworkmanagementprotocol(SNMP)wasfirstproposedbyaresearchgroupofInternetEngineeringTaskForce(IETF)forsolvingroutermanagementproblemsontheInternet.SNMPisdesignedtohavenothingtodowithprotocol,soitcanbeusedinIP,IPX,AppleTalk,OSIandothertransportprotocols,andtherefore,nowadaysnearlyallnetworkproducts,fromswitchandroutertoHub,UPSandModem,etc,supportSNMP.
ThenetworkmanagementmodelofSNMPincludesfourelements:atleastonemanagementworkstation,multiplemanagementagents,oneormultiplemanagementinformationbasesandageneralnetworkmanagementprotocol.TherelationsbetweenthefourelementsareshowninFigII:
B.Managementinformationbase(MIB)
InthenetworkmanagementofSNMP,managementinformationbase(MIB)isaimedattheinformationwhichcanbeaccessedthroughnetworkmanagementprotocol.Tobespecific,theinformationcanbeinterpretedasmanagedresourcesinnetworkmanagementandtheresourcesinnetworkmanagementarerepresentedbyobjects,eachobjectrepresentstheattributeofmanagedresourcesinacertainaspect,thesetoftheseobjectsformmanagementinformationbase.MIBfilesaredescribedbyASN.I.grammar,andthereforeinordertoaccuratelydefineallmanagementobjectsinMIB,usershavetorefertosomedocumentsrelatedtoASN.I.grammar,suchasRFCllVVandRFCI.III.II,etctodefinetheMIBofdeviceitself.
InstandardSNMPMIB(RFCI.III.III.mib),therearedifferenttables,interfacetable(IfTable)ismainlyused.Itincludesthepublicinformationofadeviceinterfaceandthistableisofespecialimportancewhenmanagingrouter,bridgeandgateway,etc,itisbecauseuserscandeterminewhichinterfaceisbusy.NrepresentstherelatedcontentoftheNthinterface,forexample,ifDeser.III"representsthedescriptionoftheIIIrdinterfaceofmanageddevice.Itisaread-onlydisplaystringanditdescribesmanufacturernameandproductnameoftheNthinterfaceandversionnumberofhardwareinterface.Itisaread-onlyenumerationtypewhosevaluesareUP(I.),Downd(II)andTesting(III)anditdescribesthedescriptionconditionsorinterfacestateoftheNthinterface.Inthefailuremanagementofnetworkmanagement,thisobjectcanbecombinedwiththeuniquewritableobjectininterfacetableifAdminStatus.Ntodeterminethecurrentstateofinterface.Bothofthetwoobjectsreturntointegers:I.,IIandIII,themeaningsofcombinationresultsareshownasthefollowingtable:
C.AgentsupportingSNMPprotocol
AllmanageddevicessupportingSNMPprotocolinthenetworkrealizetheirownagents.Accordingtodifferentrealizationtechnologies,theyaredividedintorealizationtechnologiesofSNMPagentofnetworkdeviceandrealizationtechnologiesofSNMPagentofhostsystem.ThenetworkdevicessupportingSNMPagentincluderouter,switch,dial-upserverandapplicationgateway,etc.WhenrealizingSNMPagent,theyusuallytakeSNMPagentasapartoftheiroperatingsystemstorealize.ItsbasiccompositionstructureisshownasFigIII:
TherealizationofSNMPagentbasedonhostmainlyincludesthefollowingkeytechnologies:definitionofhostMIBinformation,realizationtechnologyofcommunicationmoduleofhostSNMPagentandrealizationtechnologyofcontrolmanagementmoduleofhostSNMPagent.ThereisnoessentialdifferenceonrealizationtechnologyofbasicfunctionsbetweencommunicationmoduleofSNMPagentbasedonhostandcommunicationmodulesofSNMPagentofothernetworkdevices.LikecommunicationmodulesofSNMPagentofothernetworkdevices,communicationmoduleofhostSNMPagentmustalsorealizeallfunctionsagentshouldpossess.ThecommunicationfunctionswhichHostSNMPagentshouldrealizeinclude:respondafterreceivingSNMuserrequestsfrommanagementstationandsendSNMPagenttotheappointedmanagementstationifnecessary.Theprocessofrespondingtorequestsfrommanagementstationisasfollows:
(I.)DecomposethereceivedSNMPrequest;
(II)CheckiftheCommunitynameoftheSNMPrequestiscorrectanddiscardtherequestdatapacket;
(III)Iftherangeofsourceaddressislimited,checkifthesourceaddressofthedatapacketiswithintheallowableaccessrange,ifnot,discardthedatapacket;
(IV)Checkthetypeofthedatapacketandcarryout
correspondingtreatment;
(V)IfthedatapacketisGetResquest-PDU,returntheinformationofcorrespondingvariablesaccordingtotheidentificationofvariables;ifitisGetNextRequest-PDU,lookforthenextvariablecorrespondingtorequestandreturntheinformationofcorrespondingvariables,ifitisnotfound,returntoendmark;ifitisSetRequest-PDU,changethevaluesofcorrespondingvariablesaccordingtoeachvariablepairinthedatapacket;(VI)ConstructandreturnResponse-PDUdatapacket.Inreality,whatshouldbepaidspecialattentiontoisthatyoumustadoptdifferentmethodstoacquiretheinformationofdifferentdesignatedvariables,andtherefore,actuallytheacquisitionandsettingofvariablevaluesisaverycomplexprocess,however,forSNMPcommunicationprocess,thecomplexityofthisprocessshouldbescreenedandacquireandsetvariablevaluesonlythroughasimplefunction.
IV.APPLICATIONSERVERSEARCH
Applicationserversearchisrealizedmainlybynetworkportscanning.Portcanberegardedasthecontactpointofnetworkconnection.Ifanapplicationprogramwantstoprovideaspecificserver,itwillconnectitselftoaportandthenwaitforclients(thisisalsocalledlistening"onport).Aclientwhowantstousethisserverallocatesaportinhislocalhostandthisportwillbeconnectedtotheserverportofaremotehost.
ApplicationservercanbesearchedthroughportscanningandportsareallocatedfromnumberI.,theportsabovenumberIIVVareusuallyretainedbylocalhostforprivateuses.NumbersbetweenI.andIIVVareusedforprocessandnetworkservicerequestedbyremoteapplicationprogram.EachnetworkcommunicationcircularlygetsinandoutofTCPapplicationlayerofhostcomputeranditisuniquelyidentifiedbytwoconnectednumbers.ThecombinationofthetwonumbersiscalledsocketandthetwonumbersconstitutingsocketareIPaddressofmachineandportnumberusedbyTCPsoftware.Becausenetworkcommunicationincludesatleasttwomachines,thereisasocketinbothsendingmachineandreceivingmachine.BecausetheIPaddressofeachmachineisuniqueandtheportnumberofeachmachineisalsounique,socketinthenetworkshouldbeunique.Suchasettingcanmaketworesponseprogramsinthenetworktalkwitheachothercompletelybasedonsocket.ThesystemhasI.0IIIVreservedports.Throughtheaccesstothesereservedports,wecanknowwhatapplicationservicestargetmachinepossesses,i.e.wecanfindapplicationserverandrealizethesearchofapplicationserver.Inthisnetworkmanagementsystem,theprogrammingbasedonsocketrealizedbyJAVAlanguage(SocketTest.java)isasfollows:
importjava.io.*;
importjava.net.*;
classSocketTest{
publicstaticvoidmain(String[]args){
try
Sockett=newSocket(Stringhost,intport);
System.out.printIn(HAHA");
DataInputStreamis=new
DataInputStream(t.getInputStream());
System.out.printIn(HAHAI.");
Booleanmore=true;
While(more){
Stringstr=is.readLine();
F(str==null)more=false
elseSystem.out.printIn(str);
}
}catch(IOExceptione){System.out.printIn(Eorro"+e);}
}
}
Here,parameterhostrepresentshostnameandportrepresentsportnumber,whenwehavethehostnameoftargetmachineandportnumbercorrespondingtoacertainapplicationservice,wecanusethisprogramtorealizeaccesstothisport,therebyobtainingtheinformationofthisapplicationserver.Sendremoteaddressandportnumbertolinkingtroughfunction(Socket),ifconnectionfails,itshowsabnormalunknownhost",ifthereareotherproblems,itshowsabnormalinput/output".Oncethelinkingtroughisopened,itreturnsaninputstreamobject,whichshowsthatthisportisopen,i.e.servicescorrespondingtothisportareruninthetargetmachine.Wecanusethisinputstreamasusingotherfiles,theprogramreadsinallcharacterssentbytheserverbyReadLinemethodandoutputseachrowtostandardoutputandthenwecanseesomeinformationofthisserverclearly;thisprocessdoesn’tstopuntiltheinputstreamends,aftertheinputstreamends,theserverisdisconnected.Generally,portsofsomeapplicationservicesarefixed,forexample,wwwservicehasVIII0ports,ftpservicehasIII.ports,popIIIservicehasI.I.0ports,telnetservicehasIIIIIportsanddaytimeservicehasI.IIIports,etc.Intheaboveexample,ifyouwanttoknowifthetargethosthasdaytimeservice,youcansendportnumberIIItoSocketfunction,ifthisisinformation,theinformationreturnedtostandardoutputfromtheserveristimeinformation,0VINOVII00I.I.V:I.VIII:I.0CST,forexample.
V.REAL-TIMEFUNCTIONANDNETWORKSERVICEMONITORING
Ifcomputernetworkiscomparedtoaroad,informationisvariousvehiclesrunningonthisroad.Asroadwillbecometerriblycrowded,therapidincreaseofcommunicationtrafficwillalsoleadtothesaturationofnetworktrafficandtheninducethesharpdropofnetworkperformance.Simplyspeaking,real-timemanagementandnetworkmonitoringfunctionsofnetworkmanagementcanensureovercrowdingwillnotarise,guaranteetheavailabilityofnetworkandprovidebetternetworkcommunicationservicesforusers.Tobespecific,real-timemanagementandnetworkmonitoringshouldhavethefollowingbasicfunctions:
I..Datacollection
II.Performancemonitoringandanalyzing
III.Thresholdcontrol
IV.Visualperformancereport
V.Managedobjectmanagement
VI.Real-timeperformancemonitoring
Forthereal-timemanagementsubsystemofageneral
NMSsystem,itsoverallstructureisasfollows:
Accordingtofunction,thewholesystemcanbedividedintothefollowingclasses:dailyperformanceanalysisandmanagementtool,databasesystem,performanceanalysisandthresholdcalculation,dataacquisitionandmanagementandconfigurationtool,etc.Thestepsofperformanceanalysisareasfollows:datainquiryandrepresentation,performanceindexcalculationandperformancereportgeneration.Generallyspeaking,performancereportincludesthefollowingclasses:I..Real-timeperformancemonitoring:monitorflow,packetlossrate,delay,temperatureandCPUutilizationratio,etc.Thefrontendreal-timedrawingprogramisrealizedbyJava;II.Statisticalanalysis:scandatafilesanddrawtheperformancedistributiondiagram;III.Dataacquisitionandmanagement;IV.Configurationtool.
VI.CONCLUSION
ThenetworkmanagementsystembasedonJavarunsinalocalareanetworkandprovidesmanyservices,suchasprovidingtimelynetworktopologydiscovery,constructingthenetworktopologymap,monitoringandmanagingtheconfigurationofnetworkdevices,monitoringvariousperformancedataofnetwork,automaticallyanalyzingcurrentperformancedataandhistoricaldata,drawingthenetworkresourceperformancediagramandmanagingtheaccessrighttonetworkresources,etc.ThissystemrunssuccessfullyunderJavamode.
REFERENCES
[I.]JPMorgenthal,PortableData/PortableCode:XML&JavaTechnologies,http://java.sun.com/xml/ncfocus.html
[II]MarkJohnson,XMLfortheabsolutebeginner,Javaworld,I.IXIXIX.IV
[III]ToddSundsted,XMLandJava:Apotentpartnership,Javaworld,I.IXIXIX.VIII
[IV]DBIIXMLExtenderAdministrationandProgramming,IBM,II000
[V]DanaGardner,XMLandJava:Siblingsorrivals,Javaworld,II000.III
[VI]JiZhenyanChengHu,JavaCompilerTechnology&JavaPerformance",acceptedbyChineseJournalofAdvancedSoftwareResearch.
摘要:随着WWW,JAVA和XML等的出现,网络管理JAVA系统已经成为当前研究的I.个热点问题,并提出了I.些相关技术的实现方法,如网络拓扑搜索发现和SNMP协议(路由表),ARP协议和ICMP协议的拓扑结构重新配置,SNMP的访问处理,MIB的信息结构和MIB的信息获取,搜索和应用的实时功能服务器和网络服务监控等.
关键字:网络管理,JAVA,SNMP协议;网络服务监控
I.简介
如今,人类已经进入了信息时代并且人们对计算机和计算机网络不再陌生.信息社会对于计算机网络的依赖使得计算机网络本身的运行可靠性至关重要,并且对于网络的管理运行提出了更高的要求.本文主要就Java的网络管理功能与技术的可靠性做了几个方面的讨论,如网络拓扑搜索,SNMP的访问处理,搜索和应用的实时功能服务器和网络服务监控等.
II.搜索方法和网络拓扑结构的变形
拓扑搜索的主要目的是获取和维护网络设备存在的信息和它们的连接关系,利用它的图形表示整个网络中已经给出的连接状态,这有助于网络管理员对整个网络的拓扑有I.个整体的了解和实现.
A.网络拓扑的搜索方法
目前,有III种主要的拓扑搜索方法,即SNMP协议(路由表)的拓扑搜索,ARP协议的拓扑搜索和ICMP协议的拓扑搜索.
(I.).路由器和路由表的拓扑搜索方法.这种方法主要用于大型主干网的拓扑搜索,在网络中寻找路由设备并且反射网络的拓扑状态.(II).ARP协议的拓扑搜索方法.这种方法早前用于局部区域的网络管理并且如今仍然适用于大部分的局域网管理系统.在大型网络管理系统中,这种方法也用于局域网的拓扑搜索,以此弥补路由表的拓扑搜索方法的不足.(III).ICMP协议的拓扑搜索方法.如果我们向所有未知可能的IP地址I.个接I.个的发送ICMP *好棒文|www.hbsrm.com +Q: ^3^5^1^9^1^6^0^7^2^*
信息,这将会给网络管理工作站和网络带来巨大的负担.幸运的是,我们可以大大减少广播方式这方面的开销.另I.方面,因为只有移动设备可以发送ICMP响应报文,它的探索效率也是非常高的.
B.拓扑重构
拓扑重构意思是根据储存在数据库中的网络设备信息来重建或者升级网络的拓扑关系.在许多情况下,图形信息表示的网络拓扑与配置数据库中不I.致,例如,手动的增加或删除网络设备,这种易变可能反生,因此,我们应该时不时的根据网络配置数据库中变化的信息来更新拓扑关系数据库.路由器间的连接关系和子网的分割情形是网络拓扑中最重要的,并且因此,拓扑重构主要考虑的是增加或删除路由器以及由于路由器配置的改变而引起的拓扑结构的改变.
如果说拓扑结构的探索和获取以及配置信息的维护是配置管理的基础,那么网路自动配置的实现则是配置管理I.直追求的目标.自动配置是指网络管理系统能够根据整个网络运行情况的变化及时,自动的调整整个网络的配置以及具体的网络设备,保证网络工作在最好的状态.可用的配置操作包括配置参数调整和设备更换等,这些操作不仅可以通过SNMP或CMIP服务完成,而且可以通过其他手段.自动配置系统的操作流程图如图I.:
III.SNMP的访问处理
A.SNMP的管理模型
简单网络管理协议(SNMP)是由网络工作任务组(IETF)的I.个研究小组为了解决因特网上路由管理问题第I.个提出的.SNMP设计成与协议无关,所以它可以用于IP,IPX,AppleTalk,OSI和其他的传输协议,并且因此,如今几乎所有的网络产品,从交换机和路由器到集线器,UPS和调制解调器等,都支持SNMP.
SNMP的网络管理模型包括IV个元件:至少I.个管理工作站,多个管理代理,I.个或多个管理信息基础和I.个普通的网络管理协议.IV个元件间的关系如图II:
B.管理信息库(MIB)
在SNMP网络管理中,管理信息库是针对那些能够通过网络管理协议的的信息.具体地,这些信息可以解释为网络管理中的托管资源和网络管理中实体所代表的资源,每个实体代表托管资源属性的I.个确定的方面,这些I.整套的实体构成管理信息库.MIB文件由ASN.I.语法描述,并且为了准确的定义MIB中所有的实体,用户们必须参考I.些和ASN.I.语法相关的文献,例如RFCIIVV和RFCI.III.II等来定义设备自身的MIB.
标准的SNMPMIB(RFCI.III.III),有不同的表,接口表(IfTable)较常使用.它包括设备接口的公共信息,并且这个表在管理路由器,网桥,网关等时特别重要,这是因为用户能够确定哪个接口处于忙碌状态.N表示与第N个接口相关的内容,例如,ifDeser.III"表示托管设备的第III个接口的描述.
它是I.个只读显示的字符串,描述了第N个接口的制造商和产品名称,还有硬件接口的版本号.
它是只读枚举类型,值有UP(I.),Downd(II)和Testing(III),表示了第N个接口的描述情况或接口状态.在网络管理失败管理中,这个实体能够和唯I.可写实体组合写入接口表ifAdminStatus.N用来确定当前接口的状态.两个实体均返回整数:I.,II,III,组合结果如下表
ifOperStatusifAdminStatusMeaning
Up(I.)Up(I.)Normaloperation *好棒文|www.hbsrm.com +Q: ^3^5^1^9^1^6^0^7^2^*
Down(II)Up(I.)Failure
Down(II)Down(II)Down(Closed)
Testing(III)Testing(III)Testing(Testing)
C.代理支持SNMP协议
所有支持SNMP协议的托管设备在网络上都能实现自己的代理.根据不同的实现技术,他们被分成网络设备的SNMP代理实现技术和主机系统的SNMP代理实现技术.支持SNMP代理的网络设备包括路由器,交换机,拨号发武器和应用网关等.在实现SNMP代理时,他们通常将SNMP代理作为他们的操作系统来实现.基本组成结构如图III:
主机的SNMP代理的直线主要包括下列关键技术:主机MIB信息定义,主机SNMP代理的通信模块的实现技术和主机SNMP代理的控制管理模块的实现技术.主机的SNMP代理通信模块和其他网络设备的SNMP代理通信模块在基础功能的实现技术上没有本质的区别.相比其他网络设备的SNMP代理通信模块,主机的SNMP代理通信模块还必须实现所有功能代理.主机SNMP代理的通信功能应该实现的包括:响应从管理站接收的SNM用户请求和有必要的情况下发送SNMP代理给指定的管理站.
响应来自管理站的请求有:
(I.)分解接收的SNMP请求;
(II)检查SNMP请求的整体名字是否正确并丢弃请求数据包;
(III)如果资源地址的范围有限制,检查数据包的资源地址是否在合法的范围内,如果不在,丢弃数据包;
(IV)检查数据包的类型并执行响应的处理;
(V)如果数据包是GetResquest-PDU时,根据该信息标识变量返回对应的变量,如果它是GetNextRequest-PDU,寻找对应于请求的下I.个变量,并返回对应变量的信息,如果没有找到,返回结束标志,如果是SetRequest-PDU时,根据数据包中每个变量的值改变对应的变量的值
(VI)构建并返回Response-PDU数据包.在现实中,应特别注意的是,你必须采取不同的方法来获取不同的指定的变量信息,因此,实际变量值的获取和设置是I.个非常复杂的过程,但是,对于SNMP通信的过程中,这个过程的复杂性应进行筛选,并且变量值的获取和设置只通过I.个简单的函数.
IV.应用服务器搜索
应用程序服务器搜索,主要是实现了网络端口扫描.端口可以看作是接触点网络连接.如果I.个应用程序要提供I.个特定的服务器,它会自己连接到I.个端口,然后等待客户端(这也叫端口监听").I.个客户想要使用此服务器在本地主机分配的I.个端口和该端口将被连接到远程主机的服务器端口.
应用服务器可以通过端口扫描来搜索,端口从I.号开始分配,数字IIVV以上的端口通常由私人本地主机保留用途.I.到IIVV之间的用于进程和远程应用程序的网络服务请求.每个网络通信循环进出主机的TCP应用程序层,由两个连接数字唯I.确定.这两个数字被称为套接字并且这两个数构成的套接字是机器的IP地址和TCP软件形成的端口号.因为网络通信包括至少两台机器,在发送端和接收端有I.个套接字.因为每台机器的IP地址是唯I.的,并且每台机器的端口号也是唯I.的,套接字在网络中也应该是唯I.的.这样的设置可以使两个响应程序在与对方的网络通话时完全套接字.系统有I.0IIIV保留端口.通过访问这些保留端口,我们可以知道目标机器具备那些应用服务,即我们可以找到应用程序服务器,实现搜索应用程序服务器.在此网络管理系统,套接字的编程由JAVA语言实现(SocketTest.java)如下:
importjava.io.*;
importjava.net.*;
classSocketTest{
publicstaticvoidmain(String[]args){
try
Sockett=newSocket(Stringhost,intport);
System.out.printIn(HAHA");
DataInputStreamis=new
DataInputStream(t.getInputStream());
System.out.printIn(HAHAI.");
Booleanmore=true;
While(more){
Stringstr=is.readLine();
F(str==null)more=false
elseSystem.out.printIn(str);
}
}catch(IOExceptione){System.out.printIn(Eorro"+e);}
}
}
在这里,参数host表示主机名和port表示端口号,当我们目标机器主机名和应用服务端口号,我们可以用这个程序实现访问到这个端口,从而获得这个应用程序服务器信息.发送远程地址和端口号给连接槽函数(套接字),如果连接失败,则显示异常未知的主机",如果有其它的问题,它显示异常输入/输出"I.旦连接槽是打开时,它返回I.个输入流对象,这表明该端口是开放的,本端口对应,即服务在目标机器上运行.我们可以使用这个输入流作为使用其他文件,该程序读取服务器通过ReadLine方法发送的所有字符和输出每行到标准输出,然后我们就可以清晰的看到服务器的I.些信息,这I.过程不会停止,直到输入流端所有输入流结束后,服务器被断开.通常,I.些应用程序服务的端口是固定的,例如,WWW服务为VIII0端口,ftp服务为III.个端口,POPIII服务为I.I.0个端口,telnet服务的为IIIII个端口,白天服务具为I.III端口等.在上述例子中,如果你要知道目标主机是否有daytime服务,您可以发送端口号III至Socket函数,如果这是信息,从服务器返回到标准输出的信息是时间信息,例如,II00I.年I.I.月VI日I.V:I.VIII:I.0CST.
V.实时功能和网络服务监测
如果把计算机网络比作公路,则信息是运行在这条路上的各种车辆.道路将变得非常拥挤,迅速增加也将导致网络流量的饱和度,然后导致网络性能急剧下降.简单地来说,实时管理和网络监控网络管理的功能,可以确保人满为患不会出现,保证网络的可用性和为用户提供更好的网络通信服务.至具体而言,实时管理和网络监控应具有下列基本功能:
I..数据收集
II.性能监测和分析
III.临界值控制
IV.视觉执行报告
V.托管实体管理
VI.实时执行监视
对于I.般网管系统的实时管理子系统,其总体结构是如下
根据功能,整个系统可以被划分分为以下类别:日常性能分析和管理工具,数据库系统,性能分析和阈值计算,数据采集和管理和配置工具等性能分析的步骤如下:数据查询和代表性,性能指标的计算和性能报告生成.I.般来说,绩效报告包括以下类:I..实时性能监控:监测流量,丢包率,时延,温度和CPU利用率等前端实时绘图程序是由Java实现;II.统计分析:扫描数据文件并绘制性能分布图;III.数据采集和管理;IV.配置工具
VI.结论
运行在局域网的Java的网络管理系统中,提供许多服务,例如提供及时的网络拓扑发现,建设网络拓扑图,监控和管理网络设备的配置,监控??各种网络的性能数据,自动分析当前性能数据和历史数据,绘制网络资源的性能图表和管理对网络资源等.该系统在Java模式成功地运行.
参考文献
[I.]JPMorgenthal,PortableData/PortableCode:XML&JavaTechnologies,http://java.sun.com/xml/ncfocus.html
[II]MarkJohnson,XMLfortheabsolutebeginner,Javaworld,I.IXIXIX.IV
[III]ToddSundsted,XMLandJava:Apotentpartnership,Javaworld,I.IXIXIX.VIII
[IV]DBIIXMLExtenderAdministrationandProgramming,IBM,II000
[V]DanaGardner,XMLandJava:Siblingsorrivals,Javaworld,II000.III
[VI]JiZhenyan,ChengHu,JavaCompilerTechnology&JavaPerformance",acceptedbyChineseJournalofAdvancedSoftwareResearch.
附件I.:外文资料
DesignandRealizationofaNetworkManagementInformationSystemBasedonJAVA
HuangLiang
DepartmentofMathematicsandComputer
ShangraoNormalUniversity
Shangrao,China
light_h@I.VIIII.com
Abstract_AlongwiththeemergenceofWWW,JAVAandXML,etc,thenetworkmanagementsystembasedonJAVAhasbecomeahotissueinpresentresearchanditputforwardrealizationmethodsofsomecorrespondingtechnologies,suchasnetworktopologysearchdiscoveryandtopologyreconfigurationbasedonSNMPprotocol(routingtable),ARPprotocolandICMPprotocol,accessprocessingofSNMP,informationstructureofMIBandacquisitionofinformationbasedonMIB,searchandreal-timefunctionsofapplicationserverandnetworkservicemonitoring,etc.
Keywords-networkmanagement;JAVA;SNMPprotocol;networkservicemonitoring
I.INTRODUCTION
Nowadays,humanbeingshaveenteredtheinformationtimesandpeoplearenolongerstrangetocomputerandcomputernetwork.Thedependenceofinformationsocietyoncomputernetworkmakestheoperationalreliabilityofcomputernetworkitselfvitalandputsforwardhigherrequirementsforthemanagementoperationofnetwork.ThispapermainlymadesomediscussionontherealizationofnetworkmanagementfunctionsandtechniquesbasedonJavainseveralaspects,suchasnetworktopologysearch,accessprocessingofSNMP,searchandreal-timefunctionsofapplicationserverandnetworkservicemonitoring,etc.
II.SEARCHMETHODSANDTOPOLOGYRECONFIGURATIONOFNETWORKTOPOLOGY
Themainpurposeoftopologysearchistoacquireandmaintaintheinformationoftheexistenceofnetworkdevicesandtheirconnectionrelations,bymeansofwhichthegraphicalrepresentationoftheconnectionstateoftheentirenetworkisgiven,whichhelpsthenetworkadministratorshaveawholeunderstandingandrealizationofthetopologyofthewholenetwork.
A.Searchmethodsofnetworktopology
Atpresent,therearethreemaintopologysearchmethods,namelytopologysearchmethodbasedonSNMPprotocol(routingtable),topologysearchmethodbasedonARPprotocolandtopologysearchmethodbasedonICMPprotocol.
(I.).Topologysearchmethodbasedonrouterandroutingtable.Thismethodismainlyusedinthetopologysearchoflargebackbonenetwork,findingtheroutingdevicesinthenetworkandreflectingthetopologystatusofthenetwork.(II).TopologysearchmethodbasedonARPprotocol.Thismethodwasusedinthenetworkmanagementoflocalareanetworksagesagoandthistopologysearchmethodisstillwidelyadoptedinmostoflocalareanetworkmanagementsystemsnowadays.Inlargenetworkmanagementsystems,thismethodisalsousedintopologydiscoveryoflocalareanetworkstomakeupforthedeficiencyoftopologysearchmethodbasedonroutingtable.(III).TopologysearchmethodbasedonICMPprotocol.IfwesendICMPmessagestoallunknownpossibleIPaddressesonebyone,itwillbringenormousburdenfornetworkmanagementworkstationandnetwork.Fortunately,wecangreatlyreducethisoverheadinbroadcastmode.Ontheotherhand,becauseonlymovableequipmentcansendICMPresponsemessages,itsdiscoveryefficiencyisalsoveryhigh.
B.Topologyreconfiguration
Topologyreconfigurationmeansthatreconstructingorupdatingthetopologicalrelationofnetworkaccordingtotheinformationofnetworkequipmentstoredindatabase.Inmanycases,theinformationingraphicalrepresentationofnetworktopologyisnotinaccordancewiththatinconfigurationdatabase,forexample,whenincreasingordeletingnetworkequipmentmanually,thiskindofinconsistencymayoccur,andtherefore,wemusttimelyupdatetopologicalrelationdatabaseaccordingtothechangesofinformationinnetworkconfigurationdatabase.TheconnectionrelationsbetweenroutersanddivisionSituationofsubnetsarethemostimportantinnetworktopology,andtherefore,topologyreconfigurationmainlyconsidersincreasingordeletingroutersandtopologychangescausedbychangesofrouterconfiguration.
Iftopologydiscoveryandacquisitionandmaintenanceofconfigurationinformationarethebasisofconfigurationmanagement,therealizationofautomaticconfigurationofnetworkisthegoalthatconfigurationmanagementhasbeenpursuing.Automaticconfigurationmeansthatnetworkmanagementsystemcantimelyandautomaticallyadjusttheconfigurationofthewholenetworkandconcretenetworkequipmentaccordingtothechangesofoperationconditionofthewholenetworktoensurethatthenetworkworksinthebeststate.
Availableconfigurationoperationsincludeconfigurationparameteradjustmentandequipmentreplacement,etc.TheseoperationscanbecompletednotonlythroughSNMPorCMIPservicebutalsobyothermeans.TheschematicdiagramofoperationflowofautomaticconfigurationsystemisshownasFigI.:
III.ACCESSPROCESSINGOFSNMP
A.ManagementmodelofSNMP
Simplenetworkmanagementprotocol(SNMP)wasfirstproposedbyaresearchgroupofInternetEngineeringTaskForce(IETF)forsolvingroutermanagementproblemsontheInternet.SNMPisdesignedtohavenothingtodowithprotocol,soitcanbeusedinIP,IPX,AppleTalk,OSIandothertransportprotocols,andtherefore,nowadaysnearlyallnetworkproducts,fromswitchandroutertoHub,UPSandModem,etc,supportSNMP.
ThenetworkmanagementmodelofSNMPincludesfourelements:atleastonemanagementworkstation,multiplemanagementagents,oneormultiplemanagementinformationbasesandageneralnetworkmanagementprotocol.TherelationsbetweenthefourelementsareshowninFigII:
B.Managementinformationbase(MIB)
InthenetworkmanagementofSNMP,managementinformationbase(MIB)isaimedattheinformationwhichcanbeaccessedthroughnetworkmanagementprotocol.Tobespecific,theinformationcanbeinterpretedasmanagedresourcesinnetworkmanagementandtheresourcesinnetworkmanagementarerepresentedbyobjects,eachobjectrepresentstheattributeofmanagedresourcesinacertainaspect,thesetoftheseobjectsformmanagementinformationbase.MIBfilesaredescribedbyASN.I.grammar,andthereforeinordertoaccuratelydefineallmanagementobjectsinMIB,usershavetorefertosomedocumentsrelatedtoASN.I.grammar,suchasRFCllVVandRFCI.III.II,etctodefinetheMIBofdeviceitself.
InstandardSNMPMIB(RFCI.III.III.mib),therearedifferenttables,interfacetable(IfTable)ismainlyused.Itincludesthepublicinformationofadeviceinterfaceandthistableisofespecialimportancewhenmanagingrouter,bridgeandgateway,etc,itisbecauseuserscandeterminewhichinterfaceisbusy.NrepresentstherelatedcontentoftheNthinterface,forexample,ifDeser.III"representsthedescriptionoftheIIIrdinterfaceofmanageddevice.Itisaread-onlydisplaystringanditdescribesmanufacturernameandproductnameoftheNthinterfaceandversionnumberofhardwareinterface.Itisaread-onlyenumerationtypewhosevaluesareUP(I.),Downd(II)andTesting(III)anditdescribesthedescriptionconditionsorinterfacestateoftheNthinterface.Inthefailuremanagementofnetworkmanagement,thisobjectcanbecombinedwiththeuniquewritableobjectininterfacetableifAdminStatus.Ntodeterminethecurrentstateofinterface.Bothofthetwoobjectsreturntointegers:I.,IIandIII,themeaningsofcombinationresultsareshownasthefollowingtable:
C.AgentsupportingSNMPprotocol
AllmanageddevicessupportingSNMPprotocolinthenetworkrealizetheirownagents.Accordingtodifferentrealizationtechnologies,theyaredividedintorealizationtechnologiesofSNMPagentofnetworkdeviceandrealizationtechnologiesofSNMPagentofhostsystem.ThenetworkdevicessupportingSNMPagentincluderouter,switch,dial-upserverandapplicationgateway,etc.WhenrealizingSNMPagent,theyusuallytakeSNMPagentasapartoftheiroperatingsystemstorealize.ItsbasiccompositionstructureisshownasFigIII:
TherealizationofSNMPagentbasedonhostmainlyincludesthefollowingkeytechnologies:definitionofhostMIBinformation,realizationtechnologyofcommunicationmoduleofhostSNMPagentandrealizationtechnologyofcontrolmanagementmoduleofhostSNMPagent.ThereisnoessentialdifferenceonrealizationtechnologyofbasicfunctionsbetweencommunicationmoduleofSNMPagentbasedonhostandcommunicationmodulesofSNMPagentofothernetworkdevices.LikecommunicationmodulesofSNMPagentofothernetworkdevices,communicationmoduleofhostSNMPagentmustalsorealizeallfunctionsagentshouldpossess.ThecommunicationfunctionswhichHostSNMPagentshouldrealizeinclude:respondafterreceivingSNMuserrequestsfrommanagementstationandsendSNMPagenttotheappointedmanagementstationifnecessary.Theprocessofrespondingtorequestsfrommanagementstationisasfollows:
(I.)DecomposethereceivedSNMPrequest;
(II)CheckiftheCommunitynameoftheSNMPrequestiscorrectanddiscardtherequestdatapacket;
(III)Iftherangeofsourceaddressislimited,checkifthesourceaddressofthedatapacketiswithintheallowableaccessrange,ifnot,discardthedatapacket;
(IV)Checkthetypeofthedatapacketandcarryout
correspondingtreatment;
(V)IfthedatapacketisGetResquest-PDU,returntheinformationofcorrespondingvariablesaccordingtotheidentificationofvariables;ifitisGetNextRequest-PDU,lookforthenextvariablecorrespondingtorequestandreturntheinformationofcorrespondingvariables,ifitisnotfound,returntoendmark;ifitisSetRequest-PDU,changethevaluesofcorrespondingvariablesaccordingtoeachvariablepairinthedatapacket;(VI)ConstructandreturnResponse-PDUdatapacket.Inreality,whatshouldbepaidspecialattentiontoisthatyoumustadoptdifferentmethodstoacquiretheinformationofdifferentdesignatedvariables,andtherefore,actuallytheacquisitionandsettingofvariablevaluesisaverycomplexprocess,however,forSNMPcommunicationprocess,thecomplexityofthisprocessshouldbescreenedandacquireandsetvariablevaluesonlythroughasimplefunction.
IV.APPLICATIONSERVERSEARCH
Applicationserversearchisrealizedmainlybynetworkportscanning.Portcanberegardedasthecontactpointofnetworkconnection.Ifanapplicationprogramwantstoprovideaspecificserver,itwillconnectitselftoaportandthenwaitforclients(thisisalsocalledlistening"onport).Aclientwhowantstousethisserverallocatesaportinhislocalhostandthisportwillbeconnectedtotheserverportofaremotehost.
ApplicationservercanbesearchedthroughportscanningandportsareallocatedfromnumberI.,theportsabovenumberIIVVareusuallyretainedbylocalhostforprivateuses.NumbersbetweenI.andIIVVareusedforprocessandnetworkservicerequestedbyremoteapplicationprogram.EachnetworkcommunicationcircularlygetsinandoutofTCPapplicationlayerofhostcomputeranditisuniquelyidentifiedbytwoconnectednumbers.ThecombinationofthetwonumbersiscalledsocketandthetwonumbersconstitutingsocketareIPaddressofmachineandportnumberusedbyTCPsoftware.Becausenetworkcommunicationincludesatleasttwomachines,thereisasocketinbothsendingmachineandreceivingmachine.BecausetheIPaddressofeachmachineisuniqueandtheportnumberofeachmachineisalsounique,socketinthenetworkshouldbeunique.Suchasettingcanmaketworesponseprogramsinthenetworktalkwitheachothercompletelybasedonsocket.ThesystemhasI.0IIIVreservedports.Throughtheaccesstothesereservedports,wecanknowwhatapplicationservicestargetmachinepossesses,i.e.wecanfindapplicationserverandrealizethesearchofapplicationserver.Inthisnetworkmanagementsystem,theprogrammingbasedonsocketrealizedbyJAVAlanguage(SocketTest.java)isasfollows:
importjava.io.*;
importjava.net.*;
classSocketTest{
publicstaticvoidmain(String[]args){
try
Sockett=newSocket(Stringhost,intport);
System.out.printIn(HAHA");
DataInputStreamis=new
DataInputStream(t.getInputStream());
System.out.printIn(HAHAI.");
Booleanmore=true;
While(more){
Stringstr=is.readLine();
F(str==null)more=false
elseSystem.out.printIn(str);
}
}catch(IOExceptione){System.out.printIn(Eorro"+e);}
}
}
Here,parameterhostrepresentshostnameandportrepresentsportnumber,whenwehavethehostnameoftargetmachineandportnumbercorrespondingtoacertainapplicationservice,wecanusethisprogramtorealizeaccesstothisport,therebyobtainingtheinformationofthisapplicationserver.Sendremoteaddressandportnumbertolinkingtroughfunction(Socket),ifconnectionfails,itshowsabnormalunknownhost",ifthereareotherproblems,itshowsabnormalinput/output".Oncethelinkingtroughisopened,itreturnsaninputstreamobject,whichshowsthatthisportisopen,i.e.servicescorrespondingtothisportareruninthetargetmachine.Wecanusethisinputstreamasusingotherfiles,theprogramreadsinallcharacterssentbytheserverbyReadLinemethodandoutputseachrowtostandardoutputandthenwecanseesomeinformationofthisserverclearly;thisprocessdoesn’tstopuntiltheinputstreamends,aftertheinputstreamends,theserverisdisconnected.Generally,portsofsomeapplicationservicesarefixed,forexample,wwwservicehasVIII0ports,ftpservicehasIII.ports,popIIIservicehasI.I.0ports,telnetservicehasIIIIIportsanddaytimeservicehasI.IIIports,etc.Intheaboveexample,ifyouwanttoknowifthetargethosthasdaytimeservice,youcansendportnumberIIItoSocketfunction,ifthisisinformation,theinformationreturnedtostandardoutputfromtheserveristimeinformation,0VINOVII00I.I.V:I.VIII:I.0CST,forexample.
V.REAL-TIMEFUNCTIONANDNETWORKSERVICEMONITORING
Ifcomputernetworkiscomparedtoaroad,informationisvariousvehiclesrunningonthisroad.Asroadwillbecometerriblycrowded,therapidincreaseofcommunicationtrafficwillalsoleadtothesaturationofnetworktrafficandtheninducethesharpdropofnetworkperformance.Simplyspeaking,real-timemanagementandnetworkmonitoringfunctionsofnetworkmanagementcanensureovercrowdingwillnotarise,guaranteetheavailabilityofnetworkandprovidebetternetworkcommunicationservicesforusers.Tobespecific,real-timemanagementandnetworkmonitoringshouldhavethefollowingbasicfunctions:
I..Datacollection
II.Performancemonitoringandanalyzing
III.Thresholdcontrol
IV.Visualperformancereport
V.Managedobjectmanagement
VI.Real-timeperformancemonitoring
Forthereal-timemanagementsubsystemofageneral
NMSsystem,itsoverallstructureisasfollows:
Accordingtofunction,thewholesystemcanbedividedintothefollowingclasses:dailyperformanceanalysisandmanagementtool,databasesystem,performanceanalysisandthresholdcalculation,dataacquisitionandmanagementandconfigurationtool,etc.Thestepsofperformanceanalysisareasfollows:datainquiryandrepresentation,performanceindexcalculationandperformancereportgeneration.Generallyspeaking,performancereportincludesthefollowingclasses:I..Real-timeperformancemonitoring:monitorflow,packetlossrate,delay,temperatureandCPUutilizationratio,etc.Thefrontendreal-timedrawingprogramisrealizedbyJava;II.Statisticalanalysis:scandatafilesanddrawtheperformancedistributiondiagram;III.Dataacquisitionandmanagement;IV.Configurationtool.
VI.CONCLUSION
ThenetworkmanagementsystembasedonJavarunsinalocalareanetworkandprovidesmanyservices,suchasprovidingtimelynetworktopologydiscovery,constructingthenetworktopologymap,monitoringandmanagingtheconfigurationofnetworkdevices,monitoringvariousperformancedataofnetwork,automaticallyanalyzingcurrentperformancedataandhistoricaldata,drawingthenetworkresourceperformancediagramandmanagingtheaccessrighttonetworkresources,etc.ThissystemrunssuccessfullyunderJavamode.
REFERENCES
[I.]JPMorgenthal,PortableData/PortableCode:XML&JavaTechnologies,http://java.sun.com/xml/ncfocus.html
[II]MarkJohnson,XMLfortheabsolutebeginner,Javaworld,I.IXIXIX.IV
[III]ToddSundsted,XMLandJava:Apotentpartnership,Javaworld,I.IXIXIX.VIII
[IV]DBIIXMLExtenderAdministrationandProgramming,IBM,II000
[V]DanaGardner,XMLandJava:Siblingsorrivals,Javaworld,II000.III
[VI]JiZhenyanChengHu,JavaCompilerTechnology&JavaPerformance",acceptedbyChineseJournalofAdvancedSoftwareResearch.
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/lwqt/wxzs/241.html