I know I need to get the RTT but I really don't get how to calculate it.
For some contextualization:
I have a ns2 script which simulates a server and a receiver with 2 routers in the way. All three links - server to first router, first router to second router, second router to receiver - have different transmission speeds. The propagation delay is 10ms for the first two links and 3ms for the third one.
I'm sending a 3MB file in 1000 bytes packages (TCP's default packet size), 3146 packages total.
I don't want you to calculate it (the RTT) for me of course, I just want to know how to do it. :\
You can use Agent/Ping and collect RTT. Here is an example TCL snippet
There is only one problem if there is to much trafic de ping packet will be drop (you can see if you collect trace-all)