- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- Multipath routing problem
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++
remember no error is popping but its not working correctly just a shift of a traffic from congested link to non congested and over
no round robin
plzz help 🙁
try using
Node set multiPath_ 1
instead of
node_ set multiPath_ 1
Use that line just after creating the simulator instance and just before creating any node.
Probably it will work as you expected.
I used in one of my previous work, and it worked correctly.
a similar discussion con be found in the following link.
http://mailman.isi.edu/pipermail/ns-users/1999-November/006175.html