[ns] how can follow CBR packet in NS2
Hi Dear all, In a wireless scenario for checking bandwidth in QoS, I need to add some field to CBR packet header and when every packet reach to nodes doing some process on it . would you please help me about: 1- how can I follow CBR packets? 2- where can I find CBR packet structure for changing? 3- how can I read packet and doing some process in a node? 4- do you have a sample code for it? Please advise me about my problem, and I will be thank you for your help. Best Regards Amin - Get easy, one-click access to your favorites. Make Yahoo! your homepage.
[ns] Please help me emergency!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Hi all In wireless scenario that picture of this show at below Node 0 is sender and node 24 is receiver I want to use UDP agent for this nodes I use follow code for this purpose Please tell me is the following file correct and suitable? Why the CBR interval has not effect on time when the nodes' energy is finished? picture of nam file that show my topology is : http://rapidshare.com/files/70500344/Screenshot.png I'm waiting for your reply very thanks -- Amin Irandoost # == # Define options # == #set val(lifetime) 4000; set opt(chan) Channel/WirelessChannel set opt(prop) Propagation/TwoRayGround set opt(netif) Phy/WirelessPhy set opt(mac)Mac/SMAC set opt(ifq)Queue/DropTail/PriQueue set opt(ll) LL set opt(ant)Antenna/OmniAntenna set opt(x) 200.0 ;# X dimension of the topography set opt(y) 200.0 ;# Y dimension of the topography set opt(ifqlen) 50 ;# max packet in ifq set opt(seed) 0.0 set opt(tr) 2.tr ;# trace file set opt(nam)2.nam set opt(adhocRouting) AODV set opt(nn) 25 ;# how many nodes are simulated set opt(energymodel)EnergyModel set opt(stop) 4000.0;# simulation time set val(initialenergy) 300.0 set val(receivepower) 0.395 ;# Receiving Power set val(transmitpower) 0.660 ;# Transmitting Power set val(idlepower) 0.350 ;# Idle Power set val(sleeppower) 0.001 ;# sleep Power LL set bandwidth_ 20kb # = # unity gain, omni-directional antennas # set up the antennas to be centered in the node and 1.5 meters above it Antenna/OmniAntenna set X_ 0 Antenna/OmniAntenna set Y_ 0 Antenna/OmniAntenna set Z_ 1.5 Antenna/OmniAntenna set Gt_ 1.0 Antenna/OmniAntenna set Gr_ 1.0 # Initialize the SharedMedia interface with parameters to make # it work like the 914MHz Lucent WaveLAN DSSS radio interface Phy/WirelessPhy set CPThresh_ 10.0 Phy/WirelessPhy set CSThresh_ 1.559e-11 Phy/WirelessPhy set RXThresh_ 2.13643e-07 Phy/WirelessPhy set Rb_ 2*1e6 Phy/WirelessPhy set Pt_ 0.281838 Phy/WirelessPhy set freq_ 9.14e+8 Phy/WirelessPhy set L_ 1.0 proc finish {} { global ns_ tracefd namtrace $ns_ flush-trace close $namtrace close $tracefd puts "\n running nam...\n" # exec nam 1.nam & exit 0 } # AMAC settings Mac/SMAC set syncFlag_ 1; # sleep wakeup cycles Mac/SMAC set dutyCycle_ 60 set ns_[new Simulator] $ns_ use-scheduler Heap $ns_ set WirelessNewTrace_ ON set topo[new Topography] set tracefd[open $opt(tr) w] set namtrace[open $opt(nam) w] $ns_ trace-all $tracefd $topo load_flatgrid $opt(x) $opt(y) $ns_ namtrace-all-wireless $namtrace 200.0 200.0 set cha [new $opt(chan)] # # Create god # create-god $opt(nn) $ns_ node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channel $cha \ -topoInstance $topo \ -WiredRouting OFF \ -energyModel $opt(energymodel) \ -idlePower $val(idlepower) \ -rxPower $val(receivepower) \ -txPower $val(transmitpower) \ -sleepPower $val(sleeppower) \ -initialEnergy $val(initialenergy) \ -agentTrace ON \ -routerTrace OFF \ -macTrace OFF set j 0 set k 0 for {set i 0} {$i < $opt(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0;# disable random motion if {$i%5==0} { set j [expr $j+20] if {$i!=0} { set k 0} } $node_($i) set X_ [set k [expr $k+20]] $node_($i) set Y_ $j $node_($i) set Z_ 0.0 } for { set j 0} { $j < $opt(nn)} {incr j} { $ns_ initial_node_pos $node_($j) 2 $node_($j) color blue $node_($j) log-energy } *for { set j 0} { $j < $opt(nn)} {incr j} { set udp_($j) [new Agent/UDP] $ns_ attach-agent $node_($j) $udp_($j) } set null_(0) [new Agent/Null] $ns_ attach-agent $node_([expr $opt(nn)-1]) $null_(0)* *set cbr [new Application/Traffic/CBR] $cbr set packetSize_ 50 $cbr set interval_ 3.0 $cbr attach-agent $udp_(0) $ns_ connect $udp_(0) $null_(0) $ns_ at 50.0 "$cbr star*t" # # Tell all the nodes when the simulation ends # for {set i 0} {$i < $opt(nn) } {incr i} { $ns_ at $opt(stop) "$
[ns] Are there any documents for multi-channel assignment with single radio
Dear all, Are there any documents for simulating in multi-channel assignment with single radio, many algorithms make simulation for this by Qualnet. However,Qualnet is not for free. I hope someone can give me some documents for simulating in multi-channel assignment with single radio. Thank you. Best wishes. CHENG Yong 11.16
[ns] regarding xgraph and gnuplot
hi all I am new to NS2 world, and just recently installed NS 2.31. I would really appreciate help regarding comparison of xgraph and gnuplot, regarding their strengths and weaknesses. Thank you in advance. regard B
[ns] Running LEACH on NS2
Hi, I'm trying to run LEACH on NS2. I've installed NS2.27 and the mit package over it [on windows, using cygwin]. The installation is all fine, but when i run the test scripts so as to run/test LEACH, all of them fail. For instance, when i run: ./ns tcl/ex/wireless.tcl -sc mit/uAMPS/sims/100nodescen -rp leach -x 1000 -y 1000 -nn 101 -stop 100 -eq_energy 1 -init_energy 2 -filename leach_file -dirname leach_dir -num_clusters 5 -bs_x 0 -bs_y 0 This gives me the following errors: + couldn't open "leach_dir/conditions.txt": no such file or directory while executing "open "$opt(dirname)/conditions.txt" w" invoked from within "set outf [open "$opt(dirname)/conditions.txt" w]" (file "tcl/mobility/leach.tcl" line 14) invoked from within "source.orig tcl/mobility/leach.tcl" ("uplevel" body line 1) invoked from within "uplevel source.orig [list $fileName]" invoked from within "if [$instance_ is_http_url $fileName] { set buffer [$instance_ read_url $fileName] uplevel eval $buffer } else { uplevel source.orig [list $fileName] ..." (procedure "source" line 8) invoked from within "source tcl/mobility/$opt(rp).tcl" (file "tcl/ex/wireless.tcl" line 187) + Can anyone please help me out on this? What am I doing wrong? Thanks so much!! Regards.
[ns] Please help me emergency!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Hi all In wireless scenario that picture of this show at below Node 0 is sender and node 24 is receiver I want to use UDP agent for this nodes I use follow code for this purpose Please tell me is the attached file correct and suitable? Why the CBR interval has not effect on time when the nodes' energy is finished? I'm waiting for your reply very thanks -- Amin Irandoost
[ns] 802.11b and access point
I am looking to measure the peformance of the RTS/CTS/Data/ACK algorithm in 802.11b, the network has an access point and transmissioned are considered flawless. So it is really the RTS/CTS/Data/ACK aspec I want to measure. I am new with NS2 and would like to have some pointers about this. A usefull start would be an indication of how to build an access point in NS2. So far I could only achieved simulation with adHoc networkds, I did not found much for 802.11b with infrastructure. Thanks in advance for any help provided -- Martin
Re: [ns] Newbie question
What I'm trying to do is : say A and B are routers on the path from source S to destination D, Now, if a link between A and B fails or goes down, A should send an ICMP packet to the source S For this I need to know - 1. what methods are invoked when a link failure occurs so that I could modify it so as to drop the packet and send an ICMP packet back to the source. ne idea how do i do that ? -DP dhairya wrote: > > got sorted out few things... > However, I wanted to know what methods/objects are invoked when a link > failure occurs ? > Can one clarify this - > when i run a ns2 script, i think a single simulator object created and tht > controls the flow and events ? > > > -DP > > > > dhairya wrote: >> >> yeah. >> I got the ns2 runnin in gdb... some kind of success... i got to know >> about it from this site : http://web.syr.edu/~dchen02/FAQ.txt >> >> still learning.. >> >> Any ways... I had sent you an email...I'm in GT,Atlanta now... :) >> >> Regards, >> DP >> >> >> Claus Christmann wrote: >>> >>> >>> See inline below: >>> >>> dhairya wrote: Also, where is the output of the printf statements in the C++ class printed ?? >>> Depends on the local printf, but generally either to stdout or stderr >>> (which in most cases is your console, I think). >>> -DP dhairya wrote: > Thanks for the reply.. .but am unclear and have few more > doubtsn.. > How do I trace the actual flow ...say when I run the Tcl Script, I > want to > track Tcl Objects as well as the invoked C++ object and their values. >>> There is a little about that in the ns manual, but as far as I know if >>> you wnat to get the whole flow you have to single step through your code >>> (either by hand or by means of a debugger). >>> Pedro has some good guidelines on how to do debugging on ns2 o nhis >>> website. >>> > > Well, what I'm trying to do is understand the current protocol and > modify > it... like the NIx vector routingso I need to understand how it > updates the routing table, where it is maintained etc. >>> My call would be to get your hands on a running simulation of our >>> protocol under consideration and then single step through the code. >>> (and once you have done that, write the results down and publish them in >>> the wiki.) >>> >>> As a general note: understanding ns isn't quite easy. If you have to >>> finish your project this term (assuming you are a student in the US) and >>> have never used ns2 before this will be tough - I think so, at least. >>> >>> Good luck again, >>> >>> Claus >>> >>> > > -DP > > > Claus Christmann wrote: >> >> See inline below: >> >> dhairya wrote:Hi, >>> Hi, >>>I'm new to ns2 and had few questions regarding it : >>> 1. Is the route-computation table stored globally than specific to >>> node. >>> 2. How does this simulation work, I mean the flow from invoking the >>> ns2 >>> script to the invoking the C++ code >>> 3. If I make few changes to the existing code, how do I debug it ? >>> Is it >>> like debugging the C++ code without considering the Tcl thing >> Debugging ns2 can be tricky... ;) >> >> Pedro Vale Esterala has a good guide on setting up a ns2 debugging >> facility that includes (o)Tcl debugging capabilities: >> http://tagus.inesc-id.pt/~pestrela/ns2/index_.php >> >>> 4. the main question is the linkage of oTcl and the C++ >> See the ns2 manual for a couple of first steps on this. >> >>> - DP >>> >> >> Good Luck. >> >> Claus >> -- >> Claus Christmann >> Graduate Research Assistant >> >> Georgia Institute of Technology >> 270 Ferst Drive >> Atlanta, GA 30332-0150 >> >> http://uav.ae.gatech.edu >> >> >> > >>> >>> -- >>> Claus Christmann >>> Graduate Research Assistant >>> >>> Georgia Institute of Technology >>> 270 Ferst Drive >>> Atlanta, GA 30332-0150 >>> >>> http://uav.ae.gatech.edu >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Newbie-question-tf4818881.html#a13812603 Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Newbie question
got sorted out few things... However, I wanted to know what methods/objects are invoked when a link failure occurs ? Can one clarify this - when i run a ns2 script, i think a single simulator object created and tht controls the flow and events ? -DP dhairya wrote: > > yeah. > I got the ns2 runnin in gdb... some kind of success... i got to know > about it from this site : http://web.syr.edu/~dchen02/FAQ.txt > > still learning.. > > Any ways... I had sent you an email...I'm in GT,Atlanta now... :) > > Regards, > DP > > > Claus Christmann wrote: >> >> >> See inline below: >> >> dhairya wrote: >>> >>> Also, where is the output of the printf statements in the C++ class >>> printed >>> ?? >> Depends on the local printf, but generally either to stdout or stderr >> (which in most cases is your console, I think). >> >>> >>> -DP >>> >>> >>> dhairya wrote: Thanks for the reply.. .but am unclear and have few more doubtsn.. How do I trace the actual flow ...say when I run the Tcl Script, I want to track Tcl Objects as well as the invoked C++ object and their values. >> There is a little about that in the ns manual, but as far as I know if >> you wnat to get the whole flow you have to single step through your code >> (either by hand or by means of a debugger). >> Pedro has some good guidelines on how to do debugging on ns2 o nhis >> website. >> Well, what I'm trying to do is understand the current protocol and modify it... like the NIx vector routingso I need to understand how it updates the routing table, where it is maintained etc. >> My call would be to get your hands on a running simulation of our >> protocol under consideration and then single step through the code. >> (and once you have done that, write the results down and publish them in >> the wiki.) >> >> As a general note: understanding ns isn't quite easy. If you have to >> finish your project this term (assuming you are a student in the US) and >> have never used ns2 before this will be tough - I think so, at least. >> >> Good luck again, >> >> Claus >> >> -DP Claus Christmann wrote: > > See inline below: > > dhairya wrote:Hi, >> Hi, >>I'm new to ns2 and had few questions regarding it : >> 1. Is the route-computation table stored globally than specific to >> node. >> 2. How does this simulation work, I mean the flow from invoking the >> ns2 >> script to the invoking the C++ code >> 3. If I make few changes to the existing code, how do I debug it ? Is >> it >> like debugging the C++ code without considering the Tcl thing > Debugging ns2 can be tricky... ;) > > Pedro Vale Esterala has a good guide on setting up a ns2 debugging > facility that includes (o)Tcl debugging capabilities: > http://tagus.inesc-id.pt/~pestrela/ns2/index_.php > >> 4. the main question is the linkage of oTcl and the C++ > See the ns2 manual for a couple of first steps on this. > >> - DP >> > > Good Luck. > > Claus > -- > Claus Christmann > Graduate Research Assistant > > Georgia Institute of Technology > 270 Ferst Drive > Atlanta, GA 30332-0150 > > http://uav.ae.gatech.edu > > > >>> >> >> -- >> Claus Christmann >> Graduate Research Assistant >> >> Georgia Institute of Technology >> 270 Ferst Drive >> Atlanta, GA 30332-0150 >> >> http://uav.ae.gatech.edu >> >> >> > > -- View this message in context: http://www.nabble.com/Newbie-question-tf4818881.html#a13812410 Sent from the ns-users mailing list archive at Nabble.com.
[ns] Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) with wired-cum-wireless scenario script
Dear all, I am running a wired-cum-wireless scenario to simulate the topology of Wireless Mesh Networks, I have 6 wired hosts, every two are belong to the same domain with a router for each domain, I have 60 mobile nodes, and 30 static wireless nodes, among the static nodes I have three base stations or gateways where each one is connected to a router. Each gateway is belong to a domain and the wirless nodes are distributed among these base stations. the mobile nodes run a different routing protocol than the one used by the static wireless nodes, this topology make use of multi-interface configuration. When I start simulation I got the following error: --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o3661: no target for slot 255 _o3661 type: Classifier/Port content dump: classifier _o3661 0 offset 0 shift 2147483647 mask 5 slots slot 0: _o3660 (Agent/UDP) slot 1: _o3685 (Agent/LossMonitor) slot 2: _o3703 (Agent/LossMonitor) slot 3: _o3721 (Agent/LossMonitor) slot 4: _o3739 (Agent/LossMonitor) -- Finished standard no-slot{} default handler -- All transport agents are connected correctly, furthermore I have searched for a solution and I have the following: "if you use hierachical address. a node cannot directly connect more than one node belonging to a different domain(the first fragment in the address)." Also, I have checked this but still I got the same error. Can anybody help me to solve this problem? Thanks in advance, Ghada - Get easy, one-click access to your favorites. Make Yahoo! your homepage.
[ns] How to simulate hand off based on TCP-Migrate protocol?
hi, I am Phaneendra , I need to simulate handoff technique based on TCP-Migrate protocol in NS2 for my project.I am facing much difficult to simulate this handoff technique in NS2. So, I kindly requesting any one to help me regarding this handoff simulation. Thanking you, yours faithfully, A.Phaneendra -- View this message in context: http://www.nabble.com/How-to-simulate-hand-off-based-on-TCP-Migrate-protocol--tf4797051.html#a13723545 Sent from the ns-users mailing list archive at Nabble.com.