How do I Create a New Protocol in Ns2

In general, we have illustrated the essential steps that are functional to create a new protocol in network simulator 2.

Phase: I

As the first process, we have to create the new protocol file in network simulator 2 through creating a folder with new protocol name and source code files in the location of Ns2 ns-allinone-2.35\ns-2.35  with the file extension .cc and .h.

Creation of New Protocol Files in Ns2

Phase: II

Then, we have to compile the new protocol files in Ns2 through modifying the file and we have to add the .cc file name with the location in make file. In addition, we have to add the following files.








Then, to compile the newly created protocol we have to implement the below mentioned commands.

cd ns-allinone-2.35/ns-2.35/

sudo ./configure

Configuration of New Protocol

sudo make

If you do still have any quarrels in the above mentioned processes, you can approach us whenever you like. As well as we are hoping the best initiations from you.