Hi! We connect the VM to NS2 emulation as an ethernet interface. We have read it from a paper of magdeburg university. I agree with you because i think that the routing will be done inside the VM, but something strange happens, because if i put a node too far it listens the other nodes request, but these nodes dont listen him. I think that here is the problem because this should not happen.<br>
<br> I will paste the ns2 code for you. We use a bridge connecting all the VM because our final target is to connect a external interface as a nokia810. We use iptables on the bridge to avoid the duplicated traffic but the problem is not at iptables i am certain. <br>
<br>Could be the problem in using DumbAgent protocol?<br>i am very sorry for my bad english but i have tried to explain it clearly...if you dont understand something, just ask me and i will try to explain it better.<br><br>
thanks a lot <br>regards<br><br><br><br>set scriptname routingdemo<br>set val(chan) Channel/WirelessChannel ;# Channel Type<br>set val(prop) Propagation/TwoRayGround ;# radio-propagation model<br>
set val(netif) Phy/WirelessPhy ;# network interface type<br>set val(mac) Mac/802_11 ;# MAC type<br>set val(ifq) Queue/DropTail/PriQueue ;# interface queue type<br>
set val(ll) LL ;# link layer type<br>set val(ant) Antenna/OmniAntenna ;# antenna model<br>set val(ifqlen) 50 ;# max packet in ifq<br>set val(x) 10000 ;# x range in meters<br>
set val(y) 10000 ;# y range in meters<br>#set val(rp) AODV ;# routing protocol<br>set val(rp) DumbAgent ;# routing protocol<br>set val(nn) 4 ;# number of mobile nodes<br>
#set val(stime) 60.0 ;# simulation time<br>set val(stime) 360000.0 ;# simulation time = 100 hours<br><br>#establecemos un ancho de banda mayor para los enlaces wireless<br>Mac/802_11 set dataRate_ 11Mb<br>
Mac/802_11 set basicRate_ 2Mb<br><br><br><br>set ns [new Simulator]<br>$ns use-scheduler RealTime<br><br>set tracefd [open "|gzip > $scriptname.tr.gz" w]<br>$ns trace-all $tracefd<br>#set tr0 [new BaseTrace/ShmGZ test.tr.gz 16 400 104857600]<br>
<br>set namtrace [open "|gzip > $scriptname.nam.gz" w]<br>#set namtrace [open "|nam -r 0.1 -" w]<br>$ns namtrace-all-wireless $namtrace $val(x) $val(y)<br><br>#Procedure needed when running nam in real-time<br>
proc NamTime {} {<br> #Send time to nam periodically<br> global ns namtrace<br> set now [$ns now]<br> set next [expr $now + 0.05]<br> puts $namtrace "T -t $now"<br> flush $namtrace<br> $ns at $next "NamTime"<br>
}<br><br>#$ns at 1.0 "NamTime"<br><br>proc UniformErr {} {<br> set err [new ErrorModel]<br> $err unit packet<br> $err set rate_ 0.01<br> $err ranvar [new RandomVariable/Uniform]<br> $err drop-target [new Agent/Null]<br>
return $err<br>}<br><br>set topo [new Topography]<br><br>$topo load_flatgrid $val(x) $val(y)<br><br># Create GOD<br>create-god $val(nn)<br><br># Create channel<br>set chan_1_ [new $val(chan)]<br><br># Configure node parameters<br>
$ns node-config -adhocRouting $val(rp) \<br> -llType $val(ll) \<br> -macType $val(mac) \<br> -ifqType $val(ifq) \<br> -ifqLen $val(ifqlen) \<br> -antType $val(ant) \<br> -propType $val(prop) \<br> -phyType $val(netif) \<br>
-topoInstance $topo \<br> -agentTrace OFF \<br> -routerTrace OFF \<br> -macTrace ON \<br> -movementTrace OFF \<br> -channel $chan_1_ \<br> -IncomingErrProc UniformErr<br><br><br><br>#Procedure to configure an ns-2 node initially<br>
proc setup_node {id x y z color} {<br> <br> global ns node_<br> set node_($id) [$ns node]<br> $node_($id) set X_ $x<br> $node_($id) set Y_ $y<br> $node_($id) set Z_ $z<br> $node_($id) color $color<br>
$ns at 0 "$node_($id) setdest $x $y 0"<br> $ns at 0 "$node_($id) color $color"<br> $node_($id) random-motion 0<br>}<br> <br>setup_node 1 100 300 0 "black"<br>setup_node 2 300 300 0 "green"<br>
setup_node 3 500 300 0 "blue"<br>setup_node 4 6000 6000 0 "cyan"<br> <br>for {set i 1} {$i <= $val(nn)} {incr i} {<br> $ns at 0 "$node_($i) start";<br> $ns at $val(stime) "$node_($i) reset";<br>
}<br><br><br><br>#Network objects to access the TAP devices at the link layer<br>set raw1 [new Network/Raw]<br><br><br>$raw1 open br0 readwrite <br><br><br>#Tap Agent for each node<br>Agent/Tap set maxpkt_ 3100<br>set a1 [new Agent/Tap/Raw "2E:01:F0:54:0C:4D"]<br>
set a2 [new Agent/Tap/Raw "C2:91:EA:41:C5:6D"]<br>set a3 [new Agent/Tap/Raw "8A:9E:7A:5E:A7:C4"]<br>set a4 [new Agent/Tap/Raw "9E:C3:B1:0D:AE:F4"]<br><br>puts "install nets into taps..."<br>
#Assign network objects to TAP agents<br>$a1 network $raw1<br>$a2 network $raw1<br>$a3 network $raw1<br>$a4 network $raw1<br><br>#$ns duplex-link $node_(1) $node_(2) 10Mb 10ms DropTail<br><br><br>#Assign TAP agents to ns-2 nodes<br>
$ns attach-agent $node_(1) $a1<br>$ns attach-agent $node_(2) $a2<br>$ns attach-agent $node_(3) $a3<br>$ns attach-agent $node_(4) $a4<br><br><br><br> <br>$ns at $val(stime) "stop"<br>$ns at $val(stime) "puts \"NS EXITING ...\" ; $ns halt"<br>
<br>proc stop {} {<br> global ns tracefd raw1<br> $ns flush-trace<br> close $tracefd<br> $raw1 close<br><br>}<br> <br>puts "okey"<br> <br>$ns run<br> <br><br><br><br><br><div class="gmail_quote">
El 5 de mayo de 2009 7:29, Henning Rogge <span dir="ltr"><<a href="mailto:rogge@fgan.de">rogge@fgan.de</a>></span> escribió:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Am Monday 04 May 2009 22:55:52 schrieb Ignacio Alvarez e Iñaki Fuentes<br>
telematica:<br>
<div class="im">> hi! I am sorry henning because we are new in this kind of forums, and we<br>
> are students who are learning yet ;)<br>
</div>No problem, that's exactly how I started on this list two years ago... ;)<br>
<div class="im"><br>
> I have upgraded to olsrd 0.5.6-r4, but it does not work too. We are<br>
> running this daemon in VM Debian 4.0. About the txtinfo we dont know how to<br>
> config and install it.<br>
</div>make build_all install_all<br>
<br>
then look at the README file in lib/txtinfo in the olsrd trunk.<br>
<div class="im"><br>
> On the other hand, we dont understand this thing what you have said:<br>
><br>
> "If you use the NS-2 emulation mode just as a layer 1/2 emulation, OLSR<br>
> should not care."<br>
><br>
> We are running ns-2 emulation feature but we are not sure if it also can<br>
> support olsrd running at the same time.<br>
</div>I used NS-2 in emulation mode during my diploma thesis (and it was a pain in<br>
the a** ;) )... I remember there were two ways to connect a VM to NS2, as an<br>
ethernet interface or as an IP interface. But I think you already use the<br>
ethernet variant, so routing will be done inside the VMs.<br>
<br>
Henning<br>
<br>
<br>
*************************************************<br>
Diplom Informatiker Henning Rogge<br>
Forschungsgesellschaft für<br>
Angewandte Naturwissenschaften e. V. (FGAN)<br>
Neuenahrer Str. 20, 53343 Wachtberg, Germany<br>
Tel.: 0049 (0)228 9435-961<br>
Fax: 0049 (0)228 9435-685<br>
E-Mail: <a href="mailto:rogge@fgan.de">rogge@fgan.de</a><br>
Web: <a href="http://www.fgan.de" target="_blank">www.fgan.de</a><br>
************************************************<br>
Sitz der Gesellschaft: Bonn<br>
Registergericht: Amtsgericht Bonn VR 2530<br>
Vorstand: Prof. Dr. rer. nat. Maurus Tacke (komm. Vors.), Prof. Dr.-Ing.<br>
Joachim Ender (Stellv.)<br>
<br>
</blockquote></div><br>