Hi all, I am facing a problem in the used traffic scene within my ad hoc network. My objective is to have only 5 active connections at the same time where each connection has lasts for 40sec. below there is a part of the used traffic scene. The problem is when cbr_(2) stops a segmentation fault is generated and the simulation stops. Can any body tell me why? Thanks in advance, Ghada //--------------------------------------------- set startTime 0 set connDuration 40 set shiftTime 8
#=============================================================================================== set udp_(0) [new Agent/UDP] $ns_ attach-agent $node_(0) $udp_(0) set null_(0) [new Agent/LossMonitor] $null_(0) clear $ns_ attach-agent $node_(128) $null_(0) $ns_ connect $udp_(0) $null_(0) $udp_(0) set fid_ 1 set cbr_(0) [new Application/Traffic/CBR] $cbr_(0) set packetSize_ 492 $cbr_(0) set interval_ 0.1 $cbr_(0) set random_ 1 $cbr_(0) set maxpkts_ 500 $cbr_(0) attach-agent $udp_(0) $ns_ at [expr $startTime] "$cbr_(0) start" $ns_ at [expr $startTime+$connDuration] "$cbr_(0) stop" # # set udp_(1) [new Agent/UDP] $ns_ attach-agent $node_(1) $udp_(1) set null_(1) [new Agent/LossMonitor] $null_(1) clear $ns_ attach-agent $node_(135) $null_(1) $ns_ connect $udp_(1) $null_(1) $udp_(1) set fid_ 2 set cbr_(1) [new Application/Traffic/CBR] $cbr_(1) set packetSize_ 492 $cbr_(1) set interval_ 0.1 $cbr_(1) set random_ 1 $cbr_(1) set maxpkts_ 500 $cbr_(1) attach-agent $udp_(1) $ns_ at [expr $startTime+$shiftTime] "$cbr_(1) start" $ns_ at [expr $startTime+$shiftTime+$connDuration] "$cbr_(1) stop" # # set udp_(2) [new Agent/UDP] $ns_ attach-agent $node_(134) $udp_(2) set null_(2) [new Agent/LossMonitor] $null_(2) clear $ns_ attach-agent $node_(8) $null_(2) $ns_ connect $udp_(2) $null_(2) $udp_(2) set fid_ 3 set cbr_(2) [new Application/Traffic/CBR] $cbr_(2) set packetSize_ 492 $cbr_(2) set interval_ 0.1 $cbr_(2) set random_ 1 $cbr_(2) set maxpkts_ 500 $cbr_(2) attach-agent $udp_(2) $ns_ at [expr $startTime+2*$shiftTime] "$cbr_(2) start" $ns_ at [expr $startTime+2*$shiftTime+$connDuration] "$cbr_(2) stop" # # set udp_(3) [new Agent/UDP] $ns_ attach-agent $node_(132) $udp_(3) set null_(3) [new Agent/LossMonitor] $null_(3) clear $ns_ attach-agent $node_(7) $null_(3) $ns_ connect $udp_(3) $null_(3) $udp_(3) set fid_ 4 set cbr_(3) [new Application/Traffic/CBR] $cbr_(3) set packetSize_ 492 $cbr_(3) set interval_ 0.1 $cbr_(3) set random_ 1 $cbr_(3) set maxpkts_ 500 $cbr_(3) attach-agent $udp_(3) $ns_ at [expr $startTime+3*$shiftTime] "$cbr_(3) start" $ns_ at [expr $startTime+3*$shiftTime+$connDuration] "$cbr_(3) stop" . . . #======================================================================= --------------------------------- Never miss a thing. Make Yahoo your homepage.