I am using NS 2.1b7a and has managed to read trace file generated by Large-Scale-Web-Traffic.tcl example and collect statistics such as Packet life time. The topology is like this:
# Unbalanced dumbell topology
# Used by large-scale-web-traffic.tcl
# clients
servers
#
#
7 2 3
# \ |
| /
# -- 1 ----- 0
-- 4
# / |
\
# 426
5
I now want to collect Throughput on the link from Node0 to Node1, which should not be a problem.
However, I have just discovered that the trace file format generated by this Large-scale-web-traffic.tcl example is different from that by web-traffic.tcl example
The trace file generated by large scale is like the following
+ 0.1 87 1 tcp 1000 ------- 1 87.0 15.0 0 0
- 0.1 87 1 tcp 1000 ------- 1 87.0 15.0 0 0
r 0.14765 87 1 tcp 1000 ------- 1 87.0 15.0 0 0
+ 0.14765 1 466 tcp 1000 ------- 1 87.0 15.0 0 0
- 0.14765 1 466 tcp 1000 ------- 1 87.0 15.0 0 0
r 0.170316 1 466 tcp 1000 ------- 1 87.0 15.0 0 0
+ 0.170316 466 0 tcp 1000 ------- 1 87.0 15.0 0 0
- 0.170316 466 0 tcp 1000 ------- 1 87.0 15.0 0 0
r 0.191116 466 0 tcp 1000 ------- 1 87.0 15.0 0 0
+ 0.191116 0 2 tcp 1000 ------- 1 87.0 15.0 0 0
and the trace file generate by small scale is:
+ 0.1 2 0 tcp 1000 ------- 1 2.0 10.0 0 0
- 0.1 2 0 tcp 1000 ------- 1 2.0 10.0 0 0
r 0.1208 2 0 tcp 1000 ------- 1 2.0 10.0 0 0
+ 0.1208 0 1 tcp 1000 ------- 1 2.0 10.0 0 0
- 0.1208 0 1 tcp 1000 ------- 1 2.0 10.0 0 0
r 0.166133 0 1 tcp 1000 ------- 1 2.0 10.0 0 0
+ 0.166133 1 10 tcp 1000 ------- 1 2.0 10.0 0 0
- 0.166133 1 10 tcp 1000 ------- 1 2.0 10.0 0 0
r 0.186933 1 10 tcp 1000 ------- 1 2.0 10.0 0 0
+ 0.186933 10 1 ack 40 ------- 1 10.0 2.0 0 1
- 0.186933 10 1 ack 40 ------- 1 10.0 2.0 0 1
The diference is the source and destination (statistics number 3 and 4 ). In the small scale web example, it is the intermediate node, so I just simply collect the arrive packet from Node 0 to Node 1 devided by the time to get the Throughput.
However, for the large-scale-web-traffic.tcl, it's different. The source and destination here seem to be the original address of the packets which I think should not be, as we already have the stats number 9 and 10 (Destination and source address) to keep track of that. And also, the collected trace file does not make sense at all, because there should not be any traffic between Node87 and Node 15 because they all serve as Web Clients. Also from the trace file I could not see any traffic between Node0 and Node1
So I suppose that it is just a bug. Can anyone please point
out somthing wrong with my reasoning. Thank you very much.
Huan Pham