Hi,
I have installed ns2.27 in ubuntu12.04 and added obs_optical-burst-switching_ns227.patch.
$ uname -m
$ cat /etc/issue
Code:
Ubuntu 12.04.5 LTS \n \l
and I run sim20_7b.tcl.
according to sim20_7b.tcl,
Code:
.
.
.
for {set i 2} {$i < 12} {incr i} {
set d [expr $i + 10]
.
.
.
set temp [$n($i) set src_agent_]
$temp install_connection $d $i $d $i 0 1 $d
set temp [$n($d) set src_agent_]
$temp install_connection $i $d $i $d 1 0 $i
$ns at [expr $i] "$ftp($i) start"
}
.
.
.
$ns at 1 "plotWindow $winfile"
$ns at 10 "finish"
$ns run
it means that the tcp packet start be transmitted from node 2 to node 12 at 2,
the tcp packet start be transmitted from node 3 to node 13 at 3,
and so on the tcp packet start be transmitted from node 9 to node 19 at 9,
(finish at 10, so node 10 and node 11 are not working)
but I got this result:
Code:
fdlnumber_ 0
fdlnumber_ 0
record 1 DEBUG 3 at 2.008002064516129
corrupt error 0
corrupt error 0
record 1 DEBUG 3 at 2.025012704516129
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
corrupt error 0
record 2 DEBUG 3 at 9.039072895483869
corrupt error 0
corrupt error 0
record 4 DEBUG 3 at 9.070211659354836
corrupt error 0
corrupt error 0
record 8 DEBUG 3 at 9.101367063225803
corrupt error 0
corrupt error 0
record 16 DEBUG 3 at 9.132555747096770
corrupt error 0
corrupt error 0
record 20 DEBUG 3 at 9.157830861935494
corrupt error 0
.
.
.
except node 9 to node 19,
all of nodes didn't transmit the packet,
I checked out.tr and found
node 2~6, the tcp packet was transmitted to optical node 0,
the OP_BURST was transmitted from node 0 to node 1,
then optical node 1 didn't send tcp packet to node 12~16,
so node 12~16 can't send ack back.
Code:
+ 2 2 0 tcp 40 ------- 12 2.1 12.1 0 800
- 2 2 0 tcp 40 ------- 12 2.1 12.1 0 800
r 2.001002 2 0 tcp 40 ------- 12 2.1 12.1 0 800
+ 2.008002 0 1 OP_BURST 40 ------- 12 0.0 1.0 -1 11
- 2.008002 0 1 OP_BURST 40 ------- 12 0.0 1.0 -1 11
+ 2.008012 0 1 OP_BURST 80 ------- 12 0.0 1.0 -1 10
- 2.008012 0 1 OP_BURST 80 ------- 12 0.0 1.0 -1 10
r 2.018002 0 1 OP_BURST 40 ------- 12 0.0 1.0 -1 11
r 2.018013 0 1 OP_BURST 80 ------- 12 0.0 1.0 -1 10
+ 3 3 0 tcp 40 ------- 13 3.1 13.1 0 805
.
.
.
and node 7, node 8, the tcp packet was successfully transmitted to node 17 and node 18,
and node 17, node 18 send ack to optical node 1,
the OP_BURST was transmitted from node 1 to node 0,
but optical node 0 didn't send ack to node 7 and node 8.
Code:
.
.
.
+ 7 7 0 tcp 40 ------- 17 7.1 17.1 0 825
- 7 7 0 tcp 40 ------- 17 7.1 17.1 0 825
r 7.001002 7 0 tcp 40 ------- 17 7.1 17.1 0 825
+ 7.008002 0 1 OP_BURST 40 ------- 17 0.1 1.-1 -1 802
- 7.008002 0 1 OP_BURST 40 ------- 17 0.1 1.-1 -1 802
+ 7.008012 0 1 OP_BURST 80 ------- 17 0.1 1.-1 -1 801
- 7.008012 0 1 OP_BURST 80 ------- 17 0.1 1.-1 -1 801
r 7.018002 0 1 OP_BURST 40 ------- 17 0.1 1.-1 -1 802
r 7.018013 0 1 OP_BURST 80 ------- 17 0.1 1.-1 -1 801
+ 7.018013 1 17 tcp 40 ------- 17 7.1 17.1 0 825
- 7.018013 1 17 tcp 40 ------- 17 7.1 17.1 0 825
r 7.019015 1 17 tcp 40 ------- 17 7.1 17.1 0 825
+ 7.019015 17 1 ack 40 ------- 7 17.1 7.1 0 828
- 7.019015 17 1 ack 40 ------- 7 17.1 7.1 0 828
r 7.020017 17 1 ack 40 ------- 7 17.1 7.1 0 828
+ 7.020017 1 0 OP_BURST 40 ------- 7 1.0 0.0 -1 400
- 7.020017 1 0 OP_BURST 40 ------- 7 1.0 0.0 -1 400
r 7.030017 1 0 OP_BURST 40 ------- 7 1.0 0.0 -1 400
+ 8 8 0 tcp 40 ------- 18 8.1 18.1 0 833
- 8 8 0 tcp 40 ------- 18 8.1 18.1 0 833
+ 8 2 0 tcp 40 ---A--- 12 2.1 12.1 0 834
- 8 2 0 tcp 40 ---A--- 12 2.1 12.1 0 834
.
.
.
only node 9 successfully transmit the tcp packet.
Code:
.
.
.
+ 9 9 0 tcp 40 ------- 19 9.1 19.1 0 844
- 9 9 0 tcp 40 ------- 19 9.1 19.1 0 844
+ 9 3 0 tcp 40 ---A--- 13 3.1 13.1 0 845
- 9 3 0 tcp 40 ---A--- 13 3.1 13.1 0 845
r 9.001002 9 0 tcp 40 ------- 19 9.1 19.1 0 844
r 9.001002 3 0 tcp 40 ---A--- 13 3.1 13.1 0 845
+ 9.008002 0 1 OP_BURST 40 ------- 19 0.1 1.-1 -1 812
- 9.008002 0 1 OP_BURST 40 ------- 19 0.1 1.-1 -1 812
+ 9.008012 0 1 OP_BURST 80 ------- 19 0.1 1.-1 -1 811
- 9.008012 0 1 OP_BURST 80 ------- 19 0.1 1.-1 -1 811
r 9.018002 0 1 OP_BURST 40 ------- 19 0.1 1.-1 -1 812
r 9.018013 0 1 OP_BURST 80 ------- 19 0.1 1.-1 -1 811
+ 9.018013 1 19 tcp 40 ------- 19 9.1 19.1 0 844
- 9.018013 1 19 tcp 40 ------- 19 9.1 19.1 0 844
r 9.019015 1 19 tcp 40 ------- 19 9.1 19.1 0 844
+ 9.019015 19 1 ack 40 ------- 9 19.1 9.1 0 850
- 9.019015 19 1 ack 40 ------- 9 19.1 9.1 0 850
r 9.020017 19 1 ack 40 ------- 9 19.1 9.1 0 850
+ 9.020017 1 0 OP_BURST 40 ------- 9 1.0 0.0 -1 404
- 9.020017 1 0 OP_BURST 40 ------- 9 1.0 0.0 -1 404
r 9.030017 1 0 OP_BURST 40 ------- 9 1.0 0.0 -1 404
+ 9.030017 0 9 ack 40 ------- 9 19.1 9.1 0 850
- 9.030017 0 9 ack 40 ------- 9 19.1 9.1 0 850
r 9.031019 0 9 ack 40 ------- 9 19.1 9.1 0 850
+ 9.031019 9 0 tcp 1040 ------- 19 9.1 19.1 1 853
.
.
.
How can I resolve it?