Nothing Special   »   [go: up one dir, main page]

Lab 10 NSG

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Department of Computer Science

EE353: Computer Networks


Class: BSCS ABC
Lab 10: Generating TCL for NS2 using NSG
Lab Engineer: Syed Muhammad Ali Musa

CS381: Network Security Page 1


Lab 10: Generating TCL through NSG

Introduction
NS2 Scenarios Generator (NSG) is a tcl script generator tool used to generate TCL Scripts
automatically

Objectives
The main target of this lab to generate tcl script through NSG tool.

Tools/Software Requirement
NSG2.1, NS2

Description
NSG is a Java based tool that runs on any platform and can generate TCL Scripts for
Wired as well as Wireless Scenarios for Network Simulator 2. The procedure to execute
these TCL Scripts on NS-2 is same as those of manually written TCL Scripts.

Some of the main features of NS2 Scenarios Generator (NSG) are as mentioned below:

(1) Creating Wired and Wireless nodes just by drag and drop.
(2) Creating Simplex and Duplex links for Wired network.
(3) Creating Grid, Random and Chain topologies.
(4) Creating TCP and UDP agents. Also supports TCP Tahoe, TCP Reno, TCP New-
Reno and TCP Vegas.
(5) Supports Ad Hoc routing protocols such as DSDV, AODV, DSR and TORA.
(6) Supports FTP and CBR applications.
(7) Supports node mobility.
(8) Setting the packet size, start time of simulation, end time of simulation, transmission
range and interference     range in case of wireless networks, etc.
(9) Setting other network parameters such as bandwidth, etc for wireless scenarios.

Download the NSG2.1 from following link


https://sites.google.com/site/pengjungwu/nsg/NSG2.1.jar?attredirects=0

References
https://ns2blogger.blogspot.com/2014/04/nsg-21-tcl-script-generator.html

Lab Task:
Write a tcl script that forms a network consisting of 5 nodes, numbered from 0 to 4,
which form a ring. The links have a 128K bandwidht with 10ms delay. Set the routing
protocol to AODV. Send UDP packets from node 0 to node 2 with the rate of 0.02
seconds per packet. Start transmission at 0.05. Bring down the link between node 1 and
node 2 at 0.25. Finish the transmission at 1.000. Then run nam to view the results. What
do you see? Will packets be re-routed after the link goes down?

CS381: Network Security Page 2


Hint: Use NSG2.1 to generate tcl script.

Deliverables

Grade Criteria
This lab is graded. Min marks: 0. Max marks: 10.

Activity Minimum Maximum


Run NSG Jar file and create Fail Pass
wired and wireless Simulation
Lab Tasks 0 10

CS381: Network Security Page 3

You might also like