hi i m writing a routing Algo. for the wired network i have write most of the code and now working with load balancing issue
i have formulated it and have also write the code but problem is after sensing a congestion in a network or getting link utilization high it calls my method madd-routes which add multiple routes for load balancing but the problem is that it only shift the traffic for once i have found that ns2 send traffic in round robin when multipath_ is set to 1 as define in ns notes what would be the problem??? here is the code snippet Agent/rtProto/SLRA instproc madd-route {peerAddr dst check nodeid} { $self instvar nextHop_ global multi puts "check $check" set node_ [$self id2handle $nodeid] set dest_ [$self id2handle $dst] puts "for subnet $dst the link is $peerAddr" set ns_ [Simulator instance] set nullAgent_ [$ns_ set nullAgent_] set a [$dest_ set address_] set b [$ns_ link $node_ $peerAddr] lappend target_list $b if { $check == 1 } { if { $nextHop_($dest_) != "" } { $node_ delete-route [$dst id] $nextHop_($dst) $nullAgent_ } $node_ add-routes $dst $target_list $node_ set multipath_ 1 set $multi 1 } # check is use to to check whehter all routes are added in terget list and is #controlled in c++