In network simulator consider some nodes..and i want to assign a static node id to each node that i could print in trace file generated...how can i do this in NS2?
These might not be the easiest options but sometimes I choose the long route just to see how things actually work.
1) Using BonnMotion: Every movement trace normally starts nodes specification from node_(0) – node_(nn). In BonnMotion, NSFile.class is a Java program that converts trace files to ns-2 format so you can edite the source script NSFile.java to specify how you want each node specification to begin and then recompile (./compile) the script before each trace generation. This way you can group the nodes and assign different mobility models to each group. A group without any mobility assigned remains static.
2) In NS2, the mobility of nodes is defined in the generated mobility model trace. I would manually edit the trace file change the movement of a particular node from it's current position to same position. When the 'from' and 'to' coordinates are same, the node doesn't move.