Skip to content

Installing the tcp agent ‘tcpLinux’ under any old version of ns2

The following procedure shows the steps for installing the TCP agent ‘tcpLinux’ under any old version of ns2 (the latest version of ns2 will contain this tcp agent by default) :

1. Install ns2.31 and make sure that ns2, nam and xgraphs are working fine.

2. Copy the file “ns-linux-v2.patch” to ns-allinone-2.31/ns-2.31

3. Run a Terminal window (change to console)

4. Change to the directory ns-allinone-2.31/ns-2.31

5. Apply the patch as follows

# patch -p1 < ns-linux-v2.patch

 

This will create some directories and files under the ns2 directory and will modify some existing ns2 files.

6. After successful patching, open the file, ns-allinone-2.31ns-2.31tcplinuxsrctcp_lp.c and comment the lines 291-293 as follows.

//pr_debug(“TCP-LP: %05o|%5u|%5u|%15u|%15u|%15un”, lp->flag,
// tp->snd_cwnd, lp->remote_hz, lp->owd_min, lp->owd_max,
// lp->sowd >> 3);

7. Change to the directory ns-allinone-2.31/ns-2.31

8. Recompile the ns2 by make and make install as follows.

#make
#make install.

9. If run the  any tcl simulation script which is using this tcp protocol, now it will run without any error.

If you see any errors, check everything from step 1 to step 9.

 

The following output shows a typical comparison:

tcpw-cwnd

Leave a Reply

WhatsApp Discuss Through WhatsApp