Hello all, I am having some troubles using the ns2.29 error model over wired links. I have checked the mail list archives and could not find similar problem. Below is the part of implementation of error model in my tcl script.
. set rng [new RNG] $rng seed $seed set rv [new RandomVariable/Uniform] $rv use-rng $rng . #Loss module set em [new ErrorModel] $em unit pkt $em set rate_ $prob $em ranvar $rv $em drop-target [new Agent/Null] #Loss occurs between n0 and n1 $ns lossmodel $em $n0 $n1 . I setup a very simple scenario, where there are only 2 nodes, and a ftp over tcp connection between them. The problem comes when I set the drop rate to be a relative big value, say, 0.1 or 0.05. When the loss rate is like above, the first packet of the tcp connection always drops. It can be seen in the trace file, whose first a few lines are shown below: d 0 0 1 tcp 40 ------- 1 0.0 1.0 0 0 + 6 0 1 tcp 40 ---A--- 1 0.0 1.0 0 1 - 6 0 1 tcp 40 ---A--- 1 0.0 1.0 0 1 r 6.02032 0 1 tcp 40 ---A--- 1 0.0 1.0 0 1 + 6.02032 1 0 ack 40 ------- 1 1.0 0.0 0 2 - 6.02032 1 0 ack 40 ------- 1 1.0 0.0 0 2 d 6.04064 0 1 tcp 1064 ------- 1 0.0 1.0 1 3 d 6.04064 0 1 tcp 1064 ------- 1 0.0 1.0 2 4 + 18.04064 0 1 tcp 1064 ------- 1 0.0 1.0 1 5 - 18.04064 0 1 tcp 1064 ------- 1 0.0 1.0 1 5 r 18.069152 0 1 tcp 1064 ------- 1 0.0 1.0 1 5 + 18.069152 1 0 ack 40 ------- 1 1.0 0.0 1 6 - 18.069152 1 0 ack 40 ------- 1 1.0 0.0 1 6 r 18.089472 1 0 ack 40 ------- 1 1.0 0.0 1 6 . By checking that, I see the first packet of size 40, which should be SYN packet always losses. At first I thought it could be the problem of seed value, however, even I change the seed value, the same thing happens. Does anyone know why and how to solve the mystery? Best regards. -------- Huang Wen