I installed latest version of Cygwin and tried to install and run NS2, but it didn’t work. I check this site and found following information. http://nsnam.isi.edu/nsnam/index.php/Running_Ns_and_Nam_Under_Windows_9x/2000/XP_Using_Cygwin
I tried to search the solution on Google but couldn’t find exact answer. So, I am posting here. This may be useful to you.
The current version of Cygwin 1.7.x breaks some programs, including ns-2. Presently, there is no working version of the ns-allinone-2 series that works with Cygwin 1.7.x
Although, the above site says there is a "legacy" installation that will allow you to install Cygwin 1.5 series and then install ns-allinone-2 package. But, when I tried to install legacy, it didn’t work.
Fortunately, I found old version Cygwin 1.5.x in one of my friends’ computer. Now, it works perfectly.
Suggestion: try to get old version of Cygwin
Command to check version of Cygwin (it’s same as in Unix): uname –srv