[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

about Agent/rtProto/DV

I have a question about routing agent (e.g. DV). Who is the "target_" for
a routing update message? In rtProtoDV.cc, procedure "sendpkt" is defined

void rtProtoDV::sendpkt(...)


For other agents, e.g. TCP, it's easy to figure out that the target_
should be the agent that it connected with (TCPSink), but in case of
routing, things become complicated because there could be multiple agents
reside on the target node. Specifically, for DV routing, there are two
protocol agents: Direct and DV. In fact, I traced the execution of routing
updating process, and found out that the procedure "recv-update" had never
been called, neither had "rtProtoDV::recv(...)". But
"Agent::recv(...)" had. 

As a result, you will not be able to trasmit a packet to a destination
node that is two hops away if you are using DV routing. E.g., for the
following simple topology: 

         0  ------ 2 ------ 1

I wrote the following test program:

set ns [new Simulator]

set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]

set f [open out.tr w]
$ns trace-all $f
set nf [open out.nam w]
$ns namtrace-all $nf

$ns duplex-link $n0 $n2 5Mb 2ms DropTail
$ns duplex-link $n2 $n1 5Mb 2ms DropTail

$ns duplex-link-op $n0 $n2 orient right
$ns duplex-link-op $n2 $n1 orient right

set udp0 [new Agent/UDP]
$ns attach-agent $n0 $udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 set interval_ 1ms
$cbr0 attach-agent $udp0

set null1 [new Agent/Null]
$ns attach-agent $n1 $null1

$ns connect $udp0 $null1

$ns rtproto DV

proc finish {} {
        global ns f nf
        $ns flush-trace
        close $f
        close $nf

        puts "running nam..."
        exec nam out.nam &
        exit 0

$ns at 1.0 "$cbr0 start"
$ns at 8.0 "finish"
$ns run

Run it under the current version of NS (I don't know if running under the
old version will get a different result), you'll see no traffic come out
from node n0. The reason is that node 0 can't find a route to node 1
because its routing agent didn't get the route update message, although
routing update messages WERE sent to node 0 from node 2!

Could somebody help me to solve this problem? Thanks!

Guo, Liang