How to Run TCL File in Network Simulator 2

1. Install NS2 and set the path.

2. After Installing NS2, go the $prompt and run ns filename
For example, ns tcp.tcl (if the file name is tcp.tcl)

3. after the previous statement automatically the .nam and .tr files will be created in the same folder (the tcl file should contain the provision of tracing the nam and trace file.. those examples we will discuss later in the blog)
(nam means Network Animator and tr means Trace file)

4. to see the demo in GUI, run nam tcp.nam
(a window will be opened and you can click the run button )
5. .tr file is actual file helpful to see the performance factors like(throughput, packet drop, etc).
You can parse the .tr file using softwares like tracegraph202(need to download separately) or xgraph( which comes along with ns2)

Popular Posts