| At first, this paper analyses the current condition of mobile agent technology and the structure as well as function of simulator NS2(Network Simulator Version 2). Although mobile agent technology has many advantages that traditional distributed computing model dosen't have, it doesn't fit all types of application. How to evaluate mobile agent capability for studying mobile agent deeply is an important problem to solve. The present research content concentrates on its concept, model, framework etc. The network performance reserach is very little and the new network protocols study can't simulate directly for lacking components in NS2. The problems above become considerable obstacles on the development of the mobile agent technology.For reducing this obstacles, this paper analyses the key problems of simulating mobile agent technology on NS2, i.e. make up the simulation model of mobile agent, recognize and transfer real data of mobile agent on NS2, build TCP link dynamicly and limit its data transfer on NS2 by studying mobile agent technology's concept, model, characteristic and the structure, function of network simulator NS2 and principle of TCP protocol.This paper gives the solutions through analysing the four parts above deeply.First,defines standard implementation specification for mobile agent and construct a simulation model of mobile agent with unified implementation specification, involving mobile agent and mobile agent implement environment simulation models. Second, solves the problem of transferring real mobile agent data on NS2 by extending the current components' structure and function. Third, solves the problem of building TCP link dynamicly on NS2. Fourth, solves the problem of the limiting the data transfer on NS2.At the end, the result proves the validity of the simulation platform through the simulating example on Vista+Cygwin, observe the simulation result of through NAM and graph drawing tool. The code is wrote by C++ and Tcl. |