Yes you can install and run more than one version of ns2.
All you need to do is comment the path of any one version of ns2
in .bash_profile or .bashrc (whichever u have used).
When you want to switch to another version, comment the path settings
of the first one.
Hope it helps.
Regards,
Mohit P. Tahiliani
# kdalias
alias ns6='/home/UserXP/ns-allinone-2.26/ns-2.26/ns'
alias ns7='/home/UserXP/ns-allinone-2.27/ns-2.27/ns'
alias ns8='/home/UserXP/ns-allinone-2.28/ns-2.28/ns'
alias ns9='/home/UserXP/ns-allinone-2.29/ns-2.29/ns'
Rq : type the commande "source .bashrc" after changing the file or
logout & logon
hope it helps