о뷢չ
JOURNAL OF COMPUTER RESEARCH AND DEVELOPMENT
1999 36 8 Vol.36 No.8 1999



ƶAgentܼʵ
šɡֱƽ
ժҪInternet/Intranet ѸٷչʹӣģӦ÷Ҫ.ͳΪʵҵ׼SNMPȡйģʽ͹̶ܹĴ(agent)еռԭʼݣ޷Ӧķչ״Ϣ縺أԹӦ.
ƶ(mobile agent)ܿܣ֧Żפ豸ϣ̶ܹĴĸʵ״̬ѡʵܵĴ͵豸ڴлɳʵ(instance)ԤڹܣƶռܹݣӶӿӦٶȣĸ.вƶĽṹƺͰȫ⣬Լϵͳܺԭ͵ʵ.
ؼʡƶSNMPJava
ͼšTP393.07
NETWORK MANAGEMENT BASED ON MOBILE AGENT:ARCHITECTURE AND IMPLEMENTATION
ZHANG Song and YAN Bao-Ping
(National Research Center for Intelligent Computing Systems, Beijing 100080)
(Computer Network Information Center, Chinese Academy of Sciences, Beijing 100080)
AbstractWith the rapid development of Internet/Intranet, network is becoming larger and more complex. Traditional SNMP-based centric network management can no longer keep up with these trends. In the paper here, a new framework is put forward, which takes advantage of the mobile agent to manage network more quickly and more flexibly. In the new framework, an agent execution environment resides on the network device, substituting the old SNMP's function-static agent. Network management center selects proper agent program according to network state and distributes it to network device where instance is generated to fulfill the expected task. Mobile agent not only can collect data, but also can process these data to improve the response and relieve NMS's burden. The mobile agent structure and its control strategy are presented. A management framework with its prototype, which can integrate with SNMP, is also described.
Key wordsmobile agent, network management, SNMP, Java
1ǰ
(Internet/Intranet)Ѹٷչ͹㷺Ӧãǿ˶ڿԺЧԷҪ.Ϊʵҵ׼SNMPȡпģͣ4ɲ(ͼ1ʾ)ܹվNMS(network management station)ֲ(豸)ϵĴ(Agent)״̬ĹϢMIB(management information base)ԼNMSͬAgent֮ͨŵSNMPЭ.MIBһɣÿʾԵһ.AgentפڹϣռйϢMIBеӦֵڽӵNMSʱЩֵشNMS.NMSļпƵ㣬ͣͨGet, GetNextԭAgentζȡMIBÿֵӶۺϻõǰ״̬ȷҪĿΪ.SNMPṹرʺ豸.ķٷչSNMPģͱ¶ȱݣ NMSϢĴʱпܳΪϵͳġƿ ûжMIBݵĴʽΪܹӦִͼطʽ(Щδ֪)MIB岻ò꾡ʱռý϶Դ NMSֻäĿռԭʼݣʵʵĴֻõݣԴ˷ѣ SNMPʱһҪǾǾ豸Ķ⸺أפ豸ϵAgentûκδܣʹ򵥵ĴҲ뽫ݴ͵NMSȴصĽ AgentĹڰװ֮ǹ̶ģܰϵͳ״̬͹Ա仯е.


ͼ1SNMPĽṹ
Ӧ״ܶѧ߶ԸĽSNMPܹܽ˴/ļɻܷ1ݣTMNSNMPģͼۺϹϢ2ݵ.ЩȻͨÿΧ޷Ӧ缰ӦõĶԺױ.
̬3ݺܴ4ݼĳֺͷչΪṩµ˼·.ƶǽ˹ܡֲʽϵͳоȵ֮һضΪܹԶûĳ򣬿Բ̶ڿʼеϵͳܽϴ䲢Ŀϵͳϼִе.ĿǰһЩƶʾϵͳagentTel5, Aglets6, Odysseytelescript7.ȻƶĳֲΪѾһܹܵĳֲ̬豸ԭʼϢֻҪݵľܹܵ豸(ͬһ豸)ڱؼԴӦϢNMSӶٴNMSNMSġƿƶʵһֲֶ̬ܹܵĻ.
ܵƶģͣȻƶΪܣֿܼУ֤ͬSNMPĻ.µ߸һJavaʵֵԭϵͳ֤Ĵṹܿ.
2ƶAgentṹ
ƶָ̬Զ豸Զ豸ִеһγĿŻΪ(ֹɾ)ȫܿڷĽ.ܵƶAgentȻӸϽǹ̶ģԶ̬طϵ豸豸פϵĴĹǿɱģҰ.
ĿǰڵƶʾϵͳǹͨõĻʹƶƶʱܹΧϢӶûԵӴӣSNMPľ飬в.ĽǶȳܵƶAgentģͼ2ʾ.
߰ƶЭ(MACPmobile agent control protocol)ͬԶ豸ϵƶ򣬲״̬ϢΪ.Զ豸ƶ֧Żƶƽӿ(MACI, mobile agent control interface)л(LEE, limited execution environment)Ͱȫ(security manager)ȼ.


ͼ2ƶĽṹ
MACIṩ豸ͬ߰MACPͨŵĽӿڣܷĿָǷͬĽ.MACI鷢ߵݣɶƶ̵ĹͿ.ӷߴAgentMACIлʵ(instance)ִ.
лڱƶ̣ʹĹؼܹⲢִд.LEEõļͬĴʽأƶĳԵԴʱԶ豸ϵLEEǸԵĽ(safe\|Tel)ʹмʱLEEӦм(Java)ҲǶƴ룬ʱLEEṩ̬ӹ.
ȫ֤ȨAgentԱԴķ(ļϵͳĶдȨ).
MACPͬԶ豸Эֲ̡ƶΪ.MACIƶʱ򷢲߷ΨһʶagentIDӶܹԴп.лһƶʱ򷢲߷һΨһʶagentInstanceIDԱԴʵп.MACPеҪԭAgentķ(send)ɾ(delete)(initiate)̵ֹ(terminate)(suspend)ָ(resume)Լ(trap)״̬ѯ(statusquery).
3ƶ
ƶܿʵƶлפ豸ϵĴͳĹ̶ܹĴĸݾ״̬ͼһܹܵAgent͵豸.ĹܿĵĲԶʱ.
ܿ(ͼ3ʾ)¼ɣ
(1) ݿ⣺пʹõĴԼӦMIB.(2) ƶƶAgentķߣNMSҪӴݿȡʺϵĴͨMACPЭ齫䷢͵Զ豸ͬʱӦMIB͵NMS.(3) ܹվNMSSNMPЭܹܣԸ״̬͹ԣƶ󣬲Զ豸MIBĶӦϵ.(4) ƶAgentԭSNMPЭӿڹܵƶܹͬʱMACPSNMPƶͬSNMPϵͳϵĹؼ.
ͬSNMPģȽϣܹܾص㣺 AgentܹռݣҾļռݽзӹ AgentֻNMSĵĽSNMPЭ鴫أNMSĸɣ AgentдܣϷʱھϵĵطӦ(ǹ豸)γɶƻ(ͼ4)߷ӦٶȣЧֹӣ ƶܿʹù̶ȵطֲ磬ӶӦΧ磬ҹϵͳͬ緶ΧֱԼϵ.
ӱϽƶĿǽԭʼݲĵطͳSNMPǽԭʼ.ȻƶʹݿȲʹýṹ΢ӣܿԸõӦķչ.ܹصAgentĹܿܵص㣬ҲʹֿʵгɹʹõĹؼ.ͬܲԻشеĹϵ.AgentĹܿԼʧʣҲԼӵĸʣӵһֵʱȡӦʩ.


ͼ3ƶܿ


ͼ4ƶͬSNMPĿƻԱ
4ʵ
JavaʵϵͳһԭϵͳJavaԭõĿֲԣȽ״ﵽͬƽ̨޹.ϵͳĻǣһ̨SGI Indy Cosmoһ̨Pentium PC, Win95 Java Workshop, ͨTCP/IPϵͳJavaʵ.ԭϵͳĽṹͼ5ʾ.


ͼ5Javaʵֵԭϵͳ
socketʵMACPSNMPͨԭͣͨMACP˿ڴͿJavaΪͨSNMPЭľϢ.Ĺ.
ȣͨݹԺ豸״̬ȷӦ豸͵Agent빦.Ȼ󷢲ߵĸ߶ȹģͨMACP豸AgentBytecode.շ豸ĿƽӿյBytecode֮󣬽洢Ϊصһ.classļԼClassLoaderżAgent.ClassLoaderķloadClass()һClass͵Ķ󣬷.Ȼ󷢲߷̵MACPϢԶ豸ֻҪøClassķnewInstance()ͿԴһµʵʼ.ǿΪÿһʵһthread(suspend,resume,stop).һ豸ҪAgentͿԷMACP豸ֹвɾӦclassļ.
ƶԴϵͳİȫ⣺AgnetԴͷݣйжԱصϵͳԴʹȨ޵.Ϊ˽Щȫ⣬ʵнJavaеķֲԲ.ͲİȫԼJavaĻԣJavaԹ淶JavaԼJava run-timeϵͳʵ.JavaײİȫԼݳԶ⣬ҪverifierִеBytecode飬ĿΪֱӱдBytecodeĿ.
ƶAgentڸ߼ϵİȫJava Langṩ(security manager)ӿʵ.
ClassLoaderڶڽJavaصлʱĹ.ЩļĴ洢ʽ(磺Bytecode,ѹļzip)ļԴ(ļϵͳ)δļԴļ(ӦЩĿ¼Щͨ)Լʱõ.ClassLoaderĳ󷽷loadClassжԼع.
Security Managerϸ涨һʱӵİȫ.ЩǷжջʱļϢϵͳԣִϵͳ.ȱʡ£JavaϵͳʹSecurity Manager,κεĲȫ.ȻƶAgentб붨ͰװSecurity Manager,Java涨һװSecurity Manager,Ͳڳ滻.
Security Manager趨ķйȨ޼.ĲΥ˰ȫ򣬳checkTopLevelWindows()֮⣬еķȱʡ¶׳Security Exception.Security ManagerκβʱȨ޼飬socketһClass Loaderļ.
Ȩ޼ʱǵݿУǰлϢ(current execution context,ʱȫϢsecurity context)жջϢ(execution stack information). CECϵͳռйصǰ̵߳Ϣ(thread group,JavaûݣJavaĻ).жջϢ¼˴򵽵ǰ֮õķеķջ.ܵ˵Security ManagerԸݱȽϸĻϢ߰ȫ׼ȷ.
5ᡡ
̽ƶAgentĿܽṹͨJavaϵͳ֤.оƶAgentģͣ˿SNMPܿܣ֧Żֲ豸ϣÿĹܿԸݾı䣬м.ͨÿܿʹܿƹܿӦٶȣNMSռԭʼݵעĳЩļͨŸ.
ԭϵͳ֤˼·ĿԣΪַΪͳSNMPȱṩ;.һоAgentԺʹлЭͨû.
Ŀõ߼ƻ306(Ŀ963-306-ZD-07-7)
߼:ɣУ19707ʿоҪоΪýͨšϵṹATM.ֱƽŮ19507ʿоԱйѧԺΣҪоΪϵṹ͸Ż.
ߵλšɡйѧԺ㼼оܻоġ100080
ֱƽйѧԺġ100080
ο
1Ravon J. Towards integration of service and network management in TINA. Journal of Network and System Management, 1996, 4(3): 299317
2Michael T, Jane H et al. Information aspects and future directions in an integrated telecommunication and enterprise management environment. Journal of Network and System Management, 1995, 3(1): 111133
3David T, David W. Towards an active network architecture. ACM SIGCOMM, Computer Communication Review, 1996, 26(2): 514
4Intelligent Agent White Book. IBM, 1995. http://www.software.ibm.com/sysmen
5Kotz D, Gray R. Agent Tcl: Targeting the needs of mobile computers. IEEE Internet Computing, 1997, 1(4): 5867
6Aglets Software Development Kit (ASDK). http://aglets.trl.jbm.co.jp/
7Mobile Agent White Paper. http://www.genmagic.com/technology/techwhitepaper.html
յڣ1997-11-19
޸ڣ1998-05-19
