using the nctuns 2.0 network simulator and emulator to...

4
1 Abstract NCTUns is a network simulator and emulator. By using a novel kernel re-entering simulation methodology, it provides many unique advantages over traditional network simulators and emulators. For this reason, since its public release on November 1, 2002, as of February 16, 2005, more than 2,745 people from 80 countries in the world have registered at its web site (http://NSL.csie.nctu.edu.tw/ nctuns.html) and downloaded it. NCTUns is open-source and runs on Linux. It can simulate many different types of networks. It has many high- quality journal and conference papers supporting its simu- lation methodology, design, and implementation. After five years of development, it has become a high-quality and useful product and has received many academic honors. In this paper, we give a brief introduction to NCTUns. More information is available at its web site. Keyword: network simulation, network emulation 1. Introduction Network simulators implemented in software are valu- able tools for researchers to develop, test, and diagnose network protocols. Simulation is economical because it can carry out experiments without the actual hardware. It is flexible because it can, for example, simulate a link with any bandwidth and propagation delay. Simulation results are easier to analyze than experimental results because important information at critical points can be easily logged to help researchers diagnose network protocols. Network simulators, however, have their limitations. A complete network simulator needs to simulate networking devices (e.g., hosts and routers) and application programs that generate network traffic. It also needs to provide network utility programs to configure, monitor, and gather statistics about a simulated network. Therefore, developing a complete network simulator is a large effort. Due to limited development resources, traditional network simula- tors usually have the following drawbacks: • Simulation results are not as convincing as those pro- duced by real hardware and software equipment. In order to constrain their complexity and development cost, most network simulators usually can only simulate real-life network protocol implementations with limited details, and this may lead to incorrect results. • These simulators are not extensible in the sense that they lack the standard UNIX POSIX application pro- gramming interface (API). As such, existing or to-be- developed real-life application programs cannot run normally to generate traffic for a simulated network. Instead, they must be rewritten to use the internal API provided by the simulator (if there is any) and be com- piled with the simulator to form a single, big, and com- plex program. To overcome these problems, Wang invented a kernel re-entering simulation methodology [1, 2] and used it to implement the Harvard network simulator [3]. Later on, Wang further improved the methodology and used it to design and implement the NCTUns network simulator and emulator [4]. Using the NCTUns 2.0 Network Simulator and Emulator to Facilitate Network Researches S.Y. Wang [email protected] Department of Computer Science and Information Engineering National Chiao Tung University, Hsinchu, Taiwan

Upload: others

Post on 13-Mar-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using the NCTUns 2.0 Network Simulator and Emulator to ...shieyuan/publications/Infocom2005CameraReady.pdfifconfig, netstat, tcpdump, traceroute commands can be run on a simulated

1

Abstract

NCTUns is a network simulator and emulator. By usinga novel kernel re-entering simulation methodology, itprovides many unique advantages over traditional networksimulators and emulators. For this reason, since its publicrelease on November 1, 2002, as of February 16, 2005,more than 2,745 people from 80 countries in the world haveregistered at its web site (http://NSL.csie.nctu.edu.tw/nctuns.html) and downloaded it.

NCTUns is open-source and runs on Linux. It cansimulate many different types of networks. It has many high-quality journal and conference papers supporting its simu-lation methodology, design, and implementation. After fiveyears of development, it has become a high-quality anduseful product and has received many academic honors. Inthis paper, we give a brief introduction to NCTUns. Moreinformation is available at its web site.

Keyword: network simulation, network emulation

1. Introduction

Network simulators implemented in software are valu-able tools for researchers to develop, test, and diagnosenetwork protocols. Simulation is economical because it cancarry out experiments without the actual hardware. It isflexible because it can, for example, simulate a link withany bandwidth and propagation delay. Simulation resultsare easier to analyze than experimental results becauseimportant information at critical points can be easily loggedto help researchers diagnose network protocols.

Network simulators, however, have their limitations. Acomplete network simulator needs to simulate networkingdevices (e.g., hosts and routers) and application programsthat generate network traffic. It also needs to providenetwork utility programs to configure, monitor, and gatherstatistics about a simulated network. Therefore, developinga complete network simulator is a large effort. Due to

limited development resources, traditional network simula-tors usually have the following drawbacks:

• Simulation results are not as convincing as those pro-duced by real hardware and software equipment. Inorder to constrain their complexity and developmentcost, most network simulators usually can only simulatereal-life network protocol implementations with limiteddetails, and this may lead to incorrect results.

• These simulators are not extensible in the sense thatthey lack the standard UNIX POSIX application pro-gramming interface (API). As such, existing or to-be-developed real-life application programs cannot runnormally to generate traffic for a simulated network.Instead, they must be rewritten to use the internal APIprovided by the simulator (if there is any) and be com-piled with the simulator to form a single, big, and com-plex program.

To overcome these problems, Wang invented a kernelre-entering simulation methodology [1, 2] and used it toimplement the Harvard network simulator [3]. Later on,Wang further improved the methodology and used it todesign and implement the NCTUns network simulator andemulator [4].

Using the NCTUns 2.0 Network Simulator and Emulator to Facilitate Network Researches

S.Y. [email protected]

Department of Computer Science and Information EngineeringNational Chiao Tung University, Hsinchu, Taiwan

Page 2: Using the NCTUns 2.0 Network Simulator and Emulator to ...shieyuan/publications/Infocom2005CameraReady.pdfifconfig, netstat, tcpdump, traceroute commands can be run on a simulated

2

Due to its unique features, NCTUns has received manyacademic honors. For example, it is selected by both ACMMobiCom 2002 [5] and MobiCom 2003 [6] internationalconferences as a research demonstration. The IEEENetwork Magazine reports this tool in its July 2003 issue[7]. The IEEE MASCOTS 2004 international conferenceselects it as a tutorial [8]. The IEEE vehicular technologysociety selects it as a full-day tutorial at its workshop [9].The IEEE INFOCOM 2005 international conference selectsit as a demonstration [10]. An invited paper will bepublished by Wiley to illustrate the unique capabilities ofNCTUns [11]. In addition, an invited book chapter will bepublished by Nova Science Publishers, Inc. in one of itsnew book to introduce the unique emulation capability ofNCTUns [12].

In the rest of the paper, we will briefly present theunique features of NCTUns.

2. Unique and Important Features

It can be used as an emulator. An external host in thereal world can exchange packets (e.g., set up a TCP connec-tion) with nodes (e.g., host, router, or mobile station) in anetwork simulated by NCTUns. Two external hosts in thereal world can also exchange their packets via a networksimulated by NCTUns. This feature is very useful as thefunction and performance of real-world devices can betested under various simulated network conditions.

It directly uses the real-life Linux’s TCP/IP protocolstack to generate high-fidelity simulation results. Byusing a novel kernel re-entering simulation methodology, areal-life UNIX (e.g., Linux) kernel’s protocol stack can bedirectly used to generate high-fidelity simulation results.

It can use any real-life existing or to-be-developedUNIX application program as a traffic generatorprogram without any modification. Any real-life programcan be run on a simulated network to generate networktraffic. This enables a researcher to test the functionality andperformance of a distributed application or system undervarious network conditions. Another important advantageof this feature is that application programs developed duringsimulation studies can be directly used on real-world UNIXmachines and deployed in the real world after simulationstudies are finished. This eliminates the time and effortrequired to port a simulation prototype to a real-worldimplementation if traditional network simulators are used.

It can use any real-life UNIX network configurationand monitoring tools. For example, the UNIX route,ifconfig, netstat, tcpdump, traceroute commands can be runon a simulated network to configure or monitor the simu-lated network.

In NCTUns, the setup and usage of a simulatednetwork and application programs are exactly the sameas those used in real-world IP networks. For example,each layer-3 interface has an IP address assigned to it andapplication programs directly use these IP addresses tocommunicate with each other. For this reason, any personwho is familiar with real-world IP networks can easily learnand operate NCTUns in a few minutes. For the same reason,NCTUns can be used as an educational tool to teachstudents how to configure and operate a real-world network.

It can simulate fixed Internet, Wireless LANs,mobile ad hoc (sensor) networks, GPRS networks, andoptical networks. A wired network is composed of fixednodes and point-to-point links. Traditional circuit-switchingoptical networks and more advanced Optical BurstSwitching (OBS) networks are also supported. A wirelessnetworks is composed of IEEE 802.11 (b) mobile nodes andaccess points (both the ad-hoc mode and infrastructuremode are supported). GPRS cellular networks are alsosupported.

It can simulate various networking devices. Forexample, Ethernet hubs, switches, routers, hosts, IEEE802.11 (b) wireless stations and access points, WAN (forpurposely delaying/dropping/reordering packets), Wall(wireless signal obstacle), GPRS base station, GPRS phone,GPRS GGSN, GPRS SGSN, optical circuit switch, opticalburst switch, QoS DiffServ interior and boundary routers,etc.

It can simulate various protocols. For example, IEEE802.3 CSMA/CD MAC, IEEE 802.11 (b) CSMA/CA MAC,learning bridge protocol, spanning tree protocol, IP, MobileIP, Diffserv (QoS), RIP, OSPF, UDP, TCP, RTP/RTCP/SDP, HTTP, FTP, Telnet, etc.

Its simulation speed is high. By combining the kernelre-entering methodology with the discrete-event simulationmethodology, a simulation job can be finished quickly.

Its simulation results are repeatable. If the chosenrandom number seed for a simulation case is fixed, thesimulation results of a case are the same across differentsimulation runs even though there are some other activities(e.g., disk I/O) occurring on the simulation machine.

It provides a highly-integrated and professionalGUI environment. This GUI can help a user (1) drawnetwork topologies, (2) configure the protocol modulesused inside a node, (3) specify the moving paths of mobilenodes, (4) plot network performance graphs, (5) play backthe animation of a logged packet transfer trace, etc. Allthese operations can be easily and intuitively done with theGUI.

Page 3: Using the NCTUns 2.0 Network Simulator and Emulator to ...shieyuan/publications/Infocom2005CameraReady.pdfifconfig, netstat, tcpdump, traceroute commands can be run on a simulated

3

Its simulation engine adopts an open-system archi-tecture and is open source. By using a set of module APIsprovided by the simulation engine, a protocol module writercan easily implement his (her) protocol and integrate it intothe simulation engine. NCTUns uses a simple but effectivesyntax to describe the settings and configurations of a simu-lation job. These descriptions are generated by the GUI andstored in a suite of files. Normally the GUI will automati-cally transfer these files to the simulation engine for execu-tion. However, if a researcher wants to try his (her) noveldevice or network configurations that the current GUI doesnot support, he (she) can totally bypass the GUI andgenerate the suite of description files by himself (herself)using any text editor (or script program). The non-GUI-generated suite of files can then be manually fed to thesimulation engine for execution.

It supports remote and concurrent simulations.NCTUns adopts a distributed architecture. The GUI andsimulation engine are separately implemented and use theclient-server model to communicate. Therefore, a remoteuser using the GUI program can remotely submit his (her)simulation job to a server running the simulation engine.This scheme can easily support the cluster computing modelin which multiple simulation jobs are performed concur-rently on different server machines. This can increase thetotal simulation throughput.

It supports tactics military mobile ad hoc networksimulations and intelligent transportation systems simu-lations. In addition to supporting traditional IP networksimulations, NCTUns supports tactics military mobile adhoc network simulations in which an mobile node (e.g., atank) can actively change its location, moving speed, andmoving direction based on the current environment.NCTUns has also been used to design protocols for vehicle-formed mobile ad hoc networks on the roads, which is a

new and important application in future intelligent transpor-tation systems.

3. Conclusions

In this paper, we briefly present the developmenthistory and important features of the NCTUns 2.0 networksimulator and emulator. More information is available in itsweb site at http://NSL.csie.nctu.edu.tw/nctuns.html.

References

[1] S.Y. Wang and H.T. Kung, "A Simple Methodology forConstructing Extensible and High-Fidelity TCP/IP NetworkSimulators," IEEE INFOCOM'99, March 21-25, 1999, NewYork, USA.

[2] S.Y. Wang and H.T. Kung, "A New Methodology for EasilyConstructing Extensible and High-Fidelity TCP/IP NetworkSimulators," Computer Networks, Vol. 40, Issue 2, October2002, pp. 257-278.

[3] S.Y. Wang, Harvard TCP/IP network simulator 1.0, avail-able at http://www.eecs.harvard.edu/networking/simu-lator.html.

[4] S.Y. Wang, C.L. Chou, C.H. Huang, C.C. Hwang, Z.M.Yang, C.C. Chiou, and C.C. Lin, “The Design and Imple-mentation of the NCTUns Network Simulator,” ComputerNetworks, Vol. 42, Issue 2, June 2003, pp. 175-197.

[5] ACM MobiCom 2002 conference (The Eighth Annual Inter-national Conference on Mobile Computing andNetworking), September 23 - 28, 2002, Atlanta, USA.

[6] ACM MobiCom 2003 conference, (The Ninth Annual Inter-national Conference on Mobile Computing andNetworking), September 14- 19, 2003, San Diego, USA

[7] S.Y. Wang, “NCTUns,” In the column “Software Tools forNetworking,” IEEE Networks, Vol. 17, No.4, July 2003.

[8] IEEE MASCOTS 2004 conference (12th Annual Meeting ofthe IEEE International Symposium on Modeling, Analysis,and Simulation of Computer and TelecommunicationSystems), Volendam, The Netherlands, October 4 - 7, 2004.(available at http://www.mascots-conf.org/)

[9] The workshop on “Wireless Systems and Network Topolo-gies,” IEEE Vehicular Technology Society, September 1 - 3,2004, Taipei, Taiwan.

[10] IEEE INFOCOM 2005 conference (24th internationalconference on computer communication), March 13 - 17,2005, Miami, USA.

[11] S.Y. Wang and Y.B. Lin, “Wireless Communication Simula-tions Using NCTUns 2.0: An innovative Network Simulatorand Emulator,” Wiley Wireless Communications andMobile Computing (to appear)

Page 4: Using the NCTUns 2.0 Network Simulator and Emulator to ...shieyuan/publications/Infocom2005CameraReady.pdfifconfig, netstat, tcpdump, traceroute commands can be run on a simulated

4

[12] S.Y. Wang and K.C. Liao, “Innovative Computer NetworkEmulations using the NCTUns 2.0 Tool,” as a book chapterof the “Progress in Computer Network Research” book,Nova Science Publisher Inc. (to appear)