This is an answer to your question here ..
> post # 18 :
You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time.
Just don't add any of them to a PATH, LD_LIBRARY_PATH.
So to use ns-2.31 :
The entries you made in the ~.bashrc must be removed.
No path entries are required for any ns2 versions 2.27 .. 2.34.
The text about it is just : A ten year old text.
May have been required for some very old ns2.
The proof method is :
cd ns-allinone-2.31/ns-2.31/ ; su ; make install
The same for nam.
The binaries, 'ns' and 'nam' will be copied to /usr/local/bin/.
And thus be in a system path.