[ns] FW: DSDV physical layer problem, cannot get DSDV to work with any other setting apart from RXThresh_ 1.47635e-07 otherwise the simulation hangs, need to simulate DSDV for Phy/WirelessPhy set RXTh
Hi, I have a problem with the physical layer parameters for DSDV routing protocol. I am simulating AODV, DSR and DSDV and for AODV and DSR the physical layer parameters for 250 or 100 meters work fine. DSDV however hangs and will not simulate for the same physical layer settings, the only setting that works with DSDV is RXThresh_ 1.47635e-07 this is the only setting I can get DSDV to work with and due to this I cannot accurately compare the routing protocols for my project. I have a problem where I cannot obtain any results for Normalised Routing Load for DSDV when running the awk scripts, I am assuming the the problems with the output I need from the awk scripts may be due to large packet loss from not being able to simulate DSDV under physical layer settings other than the one stated above. I would like to simulate DSDV for 250 meters and 100 meters. The following parameters are what I use for AODV and DSR for 250 meter range. When simulating DSDV I have to omit all of the 250! meter range attributes and use only RXThresh_ 1.47635e-07 otherwise my simulation hangs. set val(txPower) 0.66 ; #250 meters Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set RXThresh_ 3.652e-10 ;#250 meters Phy/WirelessPhy set Pt_ 0.2818 ;#250 meters tx distance Phy/WirelessPhy set CSThresh_ 1.559e-11 ;#250 meters Phy/WirelessPhy set Rb_ 2*1e6 Phy/WirelessPhy set freq_ 914e+6 Phy/WirelessPhy set L_ 1.0 I cannot measure NRL (Normalised Routing Load) through my awk scripts as routing packets appear as 0.00. If I could overcome the problem with the physical layer settings it would enable me to compare these three routing protocols accurately. If anyone has encountered this problem or knows how to resolve it please help me overcome this problem. Thanks, C. Jethwani
Re: [ns] [Suggestion for your question]: help!!! Adding new protocol in NS2
Hello Manoop, I think here is the main error: ... invoked from within _o14 addr (eval body line 1) invoked from within eval $node addr $args ... The line eval $node addr $args tries to invoke the instproc addr of $node. So what you have to see is 1. The class of $node (whether it is Node, MobileNode, and so on). 2. Track down the instproc addr of that class. My guess is that the instproc addr does not exist for some reasons. You have to find out why. If you don't need it, then modify the Tcl code to remove it. But if you need it, then add instproc addr to the Tcl file. If you don't know about how to read the Tcl Error message, you can visit my blog at http://ns2ultimate.tumblr.com/post/419191200/tcl-error-message-in-ns2, or http://t-issariyakul.blogspot.com/2010/02/tcl-error-message-in-ns2_28.html Also, for more information about Tcl/OTcl, see Chapter 3 and Appendix A in the following book from Springer: T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2008. http://www.springer.com/engineering/signals/book/978-0-387-71759-3 You may also find the following website useful: http://www.ece.ubc.ca/~teerawat/NS2.htm BR, Best Regards, Teerawat Issariyakul http://www.ece.ubc.ca/~teerawat http://t-issariyakul.blogspot.com http://ns2ultimate.tumblr.com/ (Beta) Hello NS Users, I installed ns2.34 allinone in ubuntu 9.10. And first time, I am trying to add a new protocol in NS2. I followed the steps at: http://masimum.inf.um.es/nsrt-howto/pdf/nsrt-howto.pdf After applying changes, I did: $ make clean $ make When I run my tcl script then it gives below error. I thought NS2 is not identifying the new protocol that I added. The new protocol name that I added is LVRF and used the same name in TCL script. TCL script is attached. Please guide me to fix the issue. (_o14 cmd line 1) invoked from within _o14 cmd addr invoked from within catch $self cmd $args ret invoked from within if [catch $self cmd $args ret] { set cls [$self info class] global errorInfo set savedInfo $errorInfo error error when calling class $cls: $args $ (procedure _o14#8243; line 2) (SplitObject unknown line 2) invoked from within _o14 addr (eval body line 1) invoked from within eval $node addr $args (default arm line 2) invoked from within switch -exact $routingAgent_ { DSDV { set ragent [$self create-dsdv-agent $node] } DSR { $self at 0.0 $node start-dsr } AODV { set ragent [$self cre... (procedure _o3 line 14) (Simulator create-wireless-node line 14) invoked from within _o3 create-wireless-node (eval body line 1) invoked from within eval $self create-wireless-node $args (procedure _o3 line 23) (Simulator node line 23) invoked from within $ns_ node (for body line 2) invoked from within for {set i 0} {$i $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0; } (file lvrf.tcl line 63) -- Regards, Manoop Talasila Ph.D. student CS Dept, NJIT Email: m...@njit.edu On 2/23/2010, manoop talasila m...@njit.edu wrote:
[ns] directional antenna
Is anyone using directional antenna? I patch the source given in the following url to ns-2.34. http://cbg.me/2009/02/adding-directional-antenna-and-multiple-interface-support-to-ns-233/comment-page-1/#comment-143 And I download the sample from tens http://www.cse.iitk.ac.in/users/braman/tens/scripts/sample_long.tcl Changed the sample code to the following. It is runned, but while visualizing the nam file, “node 0 is not defined”. # #This is a sample Tcl script file for using with TeNs # set val(chan) Channel/WirelessChannel ;# channel type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(netif) Phy/WirelessPhy ;# network interface type set val(mac) Mac/802_11 ;# MAC type set val(ifq) Queue/DropTail/PriQueue ;# interface queue type set val(ll) LL ;# link layer type set val(ant) Antenna/DirAntenna ;# antenna model set val(ifqlen) 50 ;# max packet in ifq set val(nn) 4 ;# number of mobilenodes set val(x) 1 set val(y) 1 #One can use AODV also , all other wireless protocols currently don’t work set val(rp) AODV ;# routing protocol WLSTATIC set val(ni) 1 #This type of modulation is a new addition set opt(mod) Modulation/BPSK # == # Main Program # == # # Initialize Global Variables # set ns_ [new Simulator] set tracefd [open test.tr w] $ns_ trace-all $tracefd set namtrace [open test.nam w] $ns_ namtrace-all-wireless $namtrace $val(x) $val(y) # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) #$val(nn) create-god 6 set chan_1_ [new $val(chan)] # # Create the specified number of mobilenodes [$val(nn)] and “attach” them # to the channel. # Here two nodes are created : node(0) and node(1) # configure node $ns_ node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channel [new $val(chan)] \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF \ -channel $chan_1_ \ -numif $val(ni) \ proc create_node { x y z } { global ns_ #Mac/802_11 MAC_RTSThreshold 2000 #Mac/802_11 MAC_FragmentationThreshold 2500 #Mac/802_11 DSSS_AirPropagationTime 0.03 Mac/802_11 set dataRate_ 11mb Mac/802_11 set basicRate_ 1mb # This statement can be used to enable BPSK Modulation scheme # If one does not want to use this then it can be set to zero. # By default it is set to zero. Phy/WirelessPhy set modulationscheme_ 1 set newnode [$ns_ node] $newnode random-motion 0 $newnode set X_ $x $newnode set Y_ $y $newnode set Z_ $z return $newnode } proc create_cbr_connection { from to startTime interval packetSize } { global ns_ set udp0 [new Agent/UDP] set src [new Application/Traffic/CBR] $udp0 set packetSize_ $packetSize $src set packetSize_ $packetSize $src set interval_ $interval set sink [new Agent/Null] $ns_ attach-agent $from $udp0 $src attach-agent $udp0 $ns_ attach-agent $to $sink $ns_ connect $udp0 $sink $ns_ at $startTime “$src start” return $udp0 } proc create_tcp_connection { from to startTime } { global ns_ par set tcp [new Agent/TCP] $tcp set packetSize_ 1500 $tcp set class_ 2 set sink [new Agent/TCPSink] $ns_ attach-agent $from $tcp $ns_ attach-agent $to $sink $ns_ connect $tcp $sink set ftp [new Application/FTP] $ftp set packetSize_ 1500 $ftp attach-agent $tcp $ns_ at $startTime “$ftp start” $tcp attach $par $tcp trace cwnd_ $tcp trace maxseq_ $tcp trace rtt_ $tcp trace dupacks_ $tcp trace ack_ $tcp trace ndatabytes_ $tcp trace ndatapack_ $tcp trace nrexmit_ $tcp trace nrexmitpack_ return $tcp } $ns_ node-config -numif 1 set node_(0) [create_node 10 10 0] [$node_(0) set netif_(0)] set channel_number_ 1 [$node_(0) set netif_(0)] set Pt_ 0.1 set a [new Antenna/DirAntenna] $a setType 1 $a setAngle 90 #$a setWidth 10 [$node_(0) set netif_(0)] dir-antenna $a #This is to set the number of interfaces in one node, in this case the no. of #interfaces in node is set to 1 $ns_ node-config -numif 2 #This is the way a node is created (situated at 10,60,0) set node_(1) [create_node 10 60 0] #This is the method of setting the power at which a particular network interface of a node # will transmit at. For eg. in this case the interface no.0 of node no 1 will work at 0.005W [$node_(1) set netif_(0)] set Pt_ 0.1 #This is the method of setting the channel at which a particular network interface of a node #will work at. For eg. in this case the interface no.0 of node no 1 will work at channel 1 [$node_(1) set netif_(0)] set channel_number_ 1 #This is the method of setting the power at which a particular network interface of a #node will transmit at. For eg. in this case the interface no.1 of node no 1 will work at 0.005W [$node_(1) set