[ns] Packets in link's Queue
Hi Suppose that, Node(A) want to send packets to Node(B) by TCP protocol. Node(A) send a packet , after deliver that ACK send 2 packets and after deliver those ACk send 4 packets and ... . The bandwidth =2Mbps Propagation delay is= 10ms Link's Queue length=20 My Question is : Why some packets(almost 14 packets) go in link's queue?How I can describe this event? Thanks
Re: [ns] error in installing ns-umts-extensions
Hi nadine, I find your contact while I am searching on the mailing list. Can you tell me please what kind of work you do to use UMTS on NS2 plz sincerly nadine mansour wrote: hi, i had download ns-allinone-2.1b9a-gcc32 according to the instruction so i could download the ns-umts-extensions of Pablo Martin and Paula Ballester but i hade the following error will installig the umts extension: checking for otcl.h... -I../otcl-1.0a8 checking for libotcl1.0a8... no configure: error: Installation of otcl seems incomplete or can't be found automatically please correct the problem by telling configure where otcl is using the argument --with-otcl=/path/to/package (perhaps after installing it), or the package is not required, disable it with --with-otcl=no. make: ***No targets specified and no makefile found. Stop. I tried ./configure --with-otcl=no but I had the same problem so if you could help thanks in advance _ Call friends with PC-to-PC calling -- FREE http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline -- View this message in context: http://old.nabble.com/error-in-installing-ns-umts-extensions-tp6218475p30787932.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] storing the routing info of the neighbour nodes on the local node i
Hello All, I am using BeeAdHoc routing protocol have activated the promiscuous mode,so that all the packets from the mac layer are transferred to protocol layer.Now that I have information of all the packets,what I want to do is that is that store the information of the packets not destined for the local node and then return them to the mac layer for normal working .Following is the change i had made in mac802.11.cc to upgrade all the packets to protocol layer. /* * Address Filtering */ if(dst != (u_int32_t)index_ dst != MAC_BROADCAST) { //if(dst != (u_int32_t)index_ || dst != MAC_BROADCAST) { /* * We don't want to log this event, so we just free * the packet instead of calling the drop routine. */ //recvDATA(pktRx_); printf(Here I am: \n); //discard(pktRx_, ---);//original working of the mac802.11.cc uptarget_-recv(pktRx_, (Handler*) 0);// change made by me for transferring packets to protocol layer goto done; } so what code shall be written in order to save the info of the neighbours and then returning the packets back to mac layer.Following is the function where all the packets are received. void Beeadhoc::recv(Packet* p, Handler* h) { hdr_ip* iph = HDR_IP(p); hdr_cmn* cmh = HDR_CMN(p); hdr_beeadhoc* bhh = HDR_BEEADHOC(p); int src = Address::instance().get_nodeaddr(iph-saddr()); // Must be a packet I'm originating... if(src == localaddress cmh-num_forwards() == 0) { iph-ttl_ = IP_DEF_TTL; handleFromApp(p); } else { //if((bhh-type() != 1) (bhh-type() != 2)) { // return; //} if(){ add something here to save the info from the packets not destines for the present node''' return; } switch(bhh-type()) { case SCOUT: handleScout(p); break; case FORAGER: handleForager(p); d(versuchbhh-type()); break; } } } -- View this message in context: http://old.nabble.com/storing-the-routing-info-of-the-neighbour-nodes-on-the-local-node-i-tp30788185p30788185.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] assign different energies to different node
salam, I'm not sure about that, but try to configure nodes separatly. I mean, ( re-configure tne nodes before creating them) use this example : .. $ns_ node-config -adhocRouting $val(rp) \ -addressingType hier \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF \ -energyModel EnergyModel \ -initialEnergy 0.2 \ -rxPower 0.3 \ -txPower 0.3 \ -channel $chan_1_ for {set i 0} {$i [expr $val(nn)-11] } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0;# disable random motion } #re-configure $ns_ node-config -initialEnergy 1 \ -rxPower 0.2 \ -txPower 0.4 # continue the creation of other nodes for {set i [expr $val(nn)-11] } {$i $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0;# disable random motion } .. I hope this will be usefull hirdesh kumar wrote: hi plz tell me the way of assigning the different energies to different nodes in a tcl file -- with regards Hirdesh Kumar C-DAC Noida 09555770603 -- with regards Hirdesh Kumar C-DAC Noida 09555770603 -- View this message in context: http://old.nabble.com/assign-different-energies-to-different-node-tp30764098p30766293.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Urgent Help Needed with running AODV on NS-2.34
salam, ok, looking at your configuration file, we can see that you forgot to give the other nodes positions. look at this section : for {set i 0} {$i $val(nn) } { incr i } { set node_($i) [$ns node] $node_($i) random-motion 0; # disable random motion } # Provide initial location of mobilenodes #$node_(0) set X_ 10.0 #$node_(0) set Y_ 15.0 $node_(0) set Z_ 0.0 #$node_(1) set X_ 20.0 #$node_(1) set Y_ 25.0 #$node_(1) set Z_ 0.0 #$node_(2) set X_ 200.0 #$node_(2) set Y_ 225.0 #$node_(2) set Z_ 0.0 You created 50 nodes but only 3 of them have there positions. you need to configure the other's positions. I suggest that you test this for only 10 nodes. set val(nn) 10 and, if it works, expande to the nuber of nodes desired. i hope this will be useful Anoop thesis wrote: Hi Fellow ns2 users, I am pretty new to NS2 and need to learn it for my Thesis. I am trying to simulate AODV in ns2.34. It worked fine for a 3 node example where I could simply give the node positions and work it out. However, i am now trying to modify the 50 node example ( wireless.tcl) for a AODV scenario. The following are the changes I have implemented in the 3-node example. I may have made some basic mistakes. But please help me out. I have already created the scenario using the cmu generator setdest and cbrgen. Modified Example for 50 node AODV: # Define options 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/OmniAntenna;# antenna model set val(ifqlen) 50 ;# max packet in ifq set val(nn) 50 ;# number of mobilenodes set val(rp) AODV ;# routing protocol set val(x) 1200 ;# X dimension of topography set val(y) 800 ;# Y dimension of topography set opt(cp)../home/anoop/ns2/ns- allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/b.out set opt(sc) ../home/anoop/ns2/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest/mov.out set val(stop) 600;# time of simulation end set ns [new Simulator] set tracefd [open aodv_50.tr w] set windowVsTime2 [open win_aodv.tr w] set namtrace [open simwrls_aodv.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namtrace $val(x) $val(y) # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) create-god $val(nn) # Create nn mobilenodes [$val(nn)] and attach them to the channel. # configure the nodes $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) \ -channelType $val(chan) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF \ for {set i 0} {$i $val(nn) } { incr i } { set node_($i) [$ns node] $node_($i) random-motion 0; # disable random motion } # Provide initial location of mobilenodes #$node_(0) set X_ 10.0 #$node_(0) set Y_ 15.0 $node_(0) set Z_ 0.0 #$node_(1) set X_ 20.0 #$node_(1) set Y_ 25.0 #$node_(1) set Z_ 0.0 #$node_(2) set X_ 200.0 #$node_(2) set Y_ 225.0 #$node_(2) set Z_ 0.0 # Generation of movements #$ns at 10.0 $node_(0) setdest 10.0 5.0 3.0 #$ns at 15.0 $node_(1) setdest 45.0 14.0 5.0 #$ns at 110.0 $node_(0) setdest 48.0 5.0 5.0 # Set a TCP connection between node_(0) and node_(1) #set tcp [new Agent/TCP/Newreno] #$tcp set class_ 2 #set sink [new Agent/TCPSink] #$ns attach-agent $node_(0) $tcp #$ns attach-agent $node_(1) $sink #$ns connect $tcp $sink #set ftp [new Application/FTP] #$ftp attach-agent $tcp #$ns at 10.0 $ftp start # Printing the window size #proc plotWindow {tcpSource file} { global ns set time 0.01 set now [$ns now] #set cwnd [$tcpSource set cwnd_] #puts $file $now $cwnd #$ns at [expr $now+$time] plotWindow $tcpSource $file } #$ns at 10.1 plotWindow $tcp $windowVsTime2 # Define node initial position in nam for {set i 0} {$i $val(nn)} { incr i } { # 30 defines the node size for nam $ns initial_node_pos $node_($i) } # Telling nodes when the simulation ends for {set i 0} {$i $val(nn) } { incr i } { $ns at $val(stop)
[ns] Energy for Nodes
Dear NS users, I had a quick question. I was looking at the energy model in NS2 for the sake of my project in Wireless Ad Hoc Networks. I read on the states in which ad hoc nodes expend energy namely Rx, Tx, Idle and sleep. Is there a way we can modify the code to consider energy only for transmit mode and ignore the rest? What all changes would have to be made? Are they limited only to the energy-model.cc or would they affect any other parameters? Thanks in Advance. Anoop
[ns] Current node id and previous and next!!
Hi, I 'm doing wired scenario using NS2.I'm using TCP as protocol and FTP as an application. to illustrate my question, I'll put an example: N3 --N0---N1-N2 I created the TCP agent on N3 and TCP Sink on N2. I need to apply some conditions in my scenario and they are based on Node id. the question is during the simulation, each packet will be sent from N3 to N2 through N0 and N1, I need to know how can I get the current node id and next node and previous node at any time??? Your help is highly appreciated Regards, Mohammed -- View this message in context: http://old.nabble.com/Current-node-id-and-previous-and-next%21%21-tp30792496p30792496.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Add new congestion control protocol for WSN to ns
Hi anybody know the changes need to be made for implementing PCCP algorithm or others in ns? how to control the sending rate, ... ? thanks.
Re: [ns] AODV routing table update question
On Sat, Jan 29, 2011 at 9:34 AM, Adrian Schwartz schwart...@gmail.comwrote: Hello, I got a question about updating of routing table in AODV in the ns2 implementation. I wrote a script where node_3 is connects to node_0 nodes posiotion is node_0 0,0 node_1 100 100 node_2 200 200 node_3 300 300 After few secondes the script moves node_3 to 50,50 The connection is CBR over TCP All along the script execution the route goes through node_2 and node_1 Is there some kind procedure that i can call in order to order node_3 to recalculate the routing table? Regards Adrian