Hi Utkarsha and welcome to LQ.
Please review the
Site FAQ Section about asking effective questions and consider revising your question.
Please note that you have not included any information about what you have tried, what your exact environment is, and what level of experience you have with NS2 or programming for it.