I have a simple script I am testing things on and I was trying to get DV to
work on an MPTCP scenario. For the last 15 days I realised that it probably
doesn't work and the way to fix it is above me. Someone mentioned the LS and
I tried it and it works!!! (Future reference to guys maybe trying MPTCP)

BUT, now it doesn't send bytes. It's a simple topology and I will post the
script here. I would really appreciate it if someone/anyone out there could
take a look and see if I am missing something obvious (maybe something I
need to do with LS)

set ns [new Simulator]

#trying to get multipath for routing
$ns rtproto DV
#$ns rtproto LS
Node set multiPath_ 1 
Agent/TCP/FullTcp/Sack set signal_on_empty_ 2
Agent/rtProto/DV set advertInterval 3600
Agent/rtProto/LS set advertInterval 3600
# setup trace files
set f [open out.tr w]
$ns trace-all $f
set nf [open out.nam w]
$ns namtrace-all $nf

# mptcp sender
set n0 [$ns node]
puts "n0 $n0 [$n0 id]"

# mptcp receiver
set n1 [$ns node]
puts "n1 $n1 [$n1 id]"

# intermediate nodes 
set g1 [$ns node]
$g1 color yellow
puts "g1 $g1 [$g1 id]"
set g2 [$ns node]
$g2 color yellow
puts "g2 $g2 [$g2 id]"
set r1 [$ns node]
puts "r1 $r1 [$r1 id]"
set r2 [$ns node]
puts "r2 $r2 [$r2 id]"
set r3 [$ns node]
puts "r3 $r3 [$r3 id]"
set r4 [$ns node]
puts "r4 $r4 [$r4 id]"

#subflows of sender to gateway
$ns duplex-link $n0 $g1 1Mb 5ms DropTail
#gateway to intermediate nodes
$ns duplex-link $g1 $r1 1Mb 5ms DropTail
$ns duplex-link $g1 $r2 1Mb 5ms DropTail
$ns duplex-link $r1 $r3 1Mb 5ms RED
$ns duplex-link $r2 $r4 1Mb 5ms RED
#intermediate nodes to gateway for receiver
$ns duplex-link $r3 $g2 1Mb 5ms DropTail
$ns duplex-link $r4 $g2 1Mb 5ms DropTail
#subflows of reveiver to gateway
$ns duplex-link $n1 $g2 1Mb 5ms DropTail

# create mptcp sender
#     1. create subflows with Agent/TCP/FullTcp/Sack/Multipath
#     2. attach subflow on each interface
#     3. create mptcp core 
#     4. attach subflows to mptcp core
#     5. attach mptcp core to core node 
#     6. attach application to mptcp core
set tcp0 [new Agent/TCP/FullTcp/Sack]
#puts $tcp0
$ns attach-agent $n0 $tcp0

# create mptcp receiver
set sink0 [new Agent/TCP/FullTcp/Sack]
#puts $sink0
$ns attach-agent $n1 $sink0 
$ns connect $tcp0 $sink0
$sink0 listen

proc finish {} {
        global ns f 
        global nf
        $ns flush-trace
        close $f
        close $nf
        exec nam out.nam &

#$ns at 0 "$ns dump-routelogic-nh "
#$ns at 0.01 "[$ns get-routelogic] dump 8"
$ns at 0.1 "$tcp0 advance-bytes [expr 536 * 5]"
$ns at 3 "finish"

$ns run

# grep "^r 0\.[0-9]* [0] .* tcp" out.tr
# grep "^r 0\.[0-9]* .* [1] tcp" out.tr

in the script I have DV enable. If you run it and then run the grep commands
you will see that there are exactly 5 packets leaving node 0 and 5 packets
arriving node 1. But if you comment DV and enable LS in the trace file there
are no other packets other than the routing algorithm's

View this message in context: 
Sent from the ns-users mailing list archive at Nabble.com.

Reply via email to