NS2 or Network Simulator is a very good network simulation software. I personally recommend it for those of you who want to create network simulations.
This is for two reasons:
Firstly I promote FOSS and its FOSS
Secondly Its output is much better and elegant than the one you get from other simulations like java where in you have to frame independent programs for simulation animation, graphs, metrics calculations, etc.
Coming to techniacal details of NS-2. Frontend is oTCL and backend is C++.
I think a picture answers a thousand words
Anymore queries regarding the simulation, you can post me.