100 likes | 283 Views
Network Simulator 2. Xin Bai. Synopsis. ns (from network simulator ) is a name for series of discrete event network simulators, specifically ns-1 , ns-2 and ns-3 . All of them are discrete-event network simulator, primarily used in research and teaching. Scheme.
E N D
Network Simulator 2 Xin Bai
Synopsis ns (from network simulator) is a name for series of discrete event network simulators, specifically ns-1, ns-2 and ns-3. All of them are discrete-event network simulator, primarily used in researchand teaching.
Scheme In 1996-97, ns version 2 (ns-2) was initiated based on a refactoring. Use of Tcl was replaced by MIT's Object Tcl (OTcl), an object-oriented dialect of Tcl. The core of ns-2 is also written in C++, but the C++ simulation objects are linked to shadow objects in OTcl and variables can be linked between both language realms. Simulation scripts are written in the OTcl language, an extension of the Tcl scripting language. Presently, ns-2 consists of over 300,000 lines of source code, and there is probably a comparable amount of contributed code that is not integrated directly into the main distribution
Two Languages: C++, OTcl • C++ • Most important and kernel part of the NS2 • To implement the kernel of the architecture of the • protocol designs • From the packet flow view, the processes run on • a single node • To change or “comment out” the existing protocols • running in NS2 • Details of your research scheme.
Two Languages: C++, OTcl • Otcl • short for MIT Object Tcl • Used to build the network structure and topology • which is just the surface of your simulation • Easily to configure your network parameters • Not enough for research schemes and protocol • architecture adaption
Comparison Existing core ns-2 capability Application: ping, vat, telnet, FTP, multicast FTP, HTTP, Probabilistic and trace-driven Traffic generators, web cache. Existing ns-3 On/Off Application, asynchronous Socket API, packet sockets.
Comparison Existing core ns-2 capability Transport: TCP, UDP, SCTP, XCP TFRC, RAP, RTP. Multicast: PGM, SRM, RLM, PLM. Existing ns-3 UDP, TCP
Comparison Existing core ns-2 capability Network: Unicast, IP, MobileIP, Generic dist, vector and link state, Multicast: SRM, generic centralized. Existing ns-3 IPv4, global, static routing Multicast: static routing
Programming NS 2 FTP example.