[ns] [BUG] -- MAC 802.11 the backoff contention window is doubled erroneously
Hi to all, In 802.11 implementation, the first stage of the backoff counter should use the minimum contention window value (31). This is stated in the standard. In the ns implementation (versions 2.27, 2.28, and 2.29) there is a case where this is not true, being the first backoff window value equal to 63. Explaining: 1 - suppose we want to send a broadcast packet (which uses the bascmode) 2 - initially the channel is idle and a new defer timer will be called at the send procedure; 3 - when the defer timer expires, and if the channel is busy (becausea new reception can occur in the deferring period) the node will start a backoff counter with initial contention window of 63! In the code you can see this situation by the observing the following function sequence calling: -deferHandler(); the defer timer expires -check_pktTx(); sees if there are something to transmit if we have something to transmit this function will call is_idle() function at the MAC_Subtype_Data branch. Observe that if the channel is busy, the backoff will be started with the contention window doubled, as inc_cw() is called before the backoff_.start. The defer timer can not be viewed as the first backoff stage, as it does not freeze the counter when the channel is busy. So the backoff really starts with the contention window doubled. This situation is observed in the last 2.29 ns version. This degrades the 802.11 performance, making contention times bigger than expected. I hope some feedback from 802.11 module developers. Cheers, Rodolfo -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.8/380 - Release Date: 30-06-2006
[ns] Dropped Packets
Hello All... I am working on an admission controller. I wrote a pair of .cc and .h file which are the admission controller. I have done the necessary linking in the TCL and other c++ modifications. I am ending up in the trace file having my admission controller packets being dropped at the node which is sending them. Apparently they have a next hop value of -2. I have tried changing the packets' next hop value from within the AODV routing protocol by putting an if statement to see when it receives packets from the admission controller and then putting the correct next hop value through reading it from the routing table. This has resulted in a segmentation fault. Can you please advice ?? ps: I don't know how to get the admission controller read the routing table of AODV of the concerned node from within itself (that is the admission controller). Best Regards, Ibrahim
[ns] Installation problem of ns-2.1b8a
During installing ns-2.1b8a on RedHat Linux 8.0, I am facing the following problem ns make failed (trace.o not found) one error. machine configuration:pentium 4 :main board-845, ram-384Mb
[ns] Installation problem of ns-2.1b8a
During installing ns-2.1b8a on RedHat Linux 8.0, Iam facing the following problem. ns make failed (trace.o) one error Kindly give me the solution as soon as possible
[ns] How to change parameters via TCL file in 802.11e TKN model
Hi all, I'm using 802.11e TKN model and I just want to know the way to change the parameters (e.g. AIFS, TXOP, CW_MIN, etc) via TCL file. I tried as follows but didn't work. $opt(ifq-bs) Prio 0 CW_MIN 31 If anyone knows the way please reply me. Thanks in advance. Sithira
Re: [ns] Finding Node ID
http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html Type of Addresses that a node can have in NS2 (hAddr, ID, iAddr, Handle)? In NS2, a node can be uniquely identified by several forms the handle is the otcl name; it refers to an object of the form _oXXX, and because of this, it is the only form can be used to directly call internal instprocs and variables. the haddr is the Hierarchical address, on the form X.Y.Z the iaddr is the INTEGER hierarchical address, where the haddr string is simply ENCODED in a 32 bit integer. the id is the sequential Node ID of the simulator. ... In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all possible conversions of each form, using the procs handle2iaddr, handle2haddr, handle2id, etc. http://tagus.inesc-id.pt/~pestrela/ns2/files/ns2_shared_procs.tcl Feel free to ask further questions if necessary Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicholas Loulloudes Sent: segunda-feira, 3 de Julho de 2006 10:55 To: ns-users@ISI.EDU Subject: [ns] Finding Node ID Hello, I am currently implementing a routing algorithm in NS2. I have utilized the command [$node neighbors] for discovering the neighbors of a specific node. This command returns a list with the following three elements (_o13, _o16, _019). Is is possible in TCL to retrieve dynamically the ID of each node using this elements in the list. For example: _o19 = n(1) _o13 = n (0) _o16 = n(2) Regards, -- Nicholas Loulloudes Postgraduate at Communication Networks and Software. BSc in Computer Science.
[ns] GSM and CDMA
Hello all! I'm student in indonesia. I'm thesis about make simulation network wireless GSM and CDMA using NS2. Please send me information about it! Thanks Indra'. - Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta.
Re: [ns] Multiple connections to a single agent
I'm not sure I understand, and perhaps I've not adequately described what I'm trying to do, so I'll try again using a semi-hypothetical scenario: (Please keep in mind I'm new to ns!) Suppose I've got the following topology: N1 - N2 - N3 And three different agents, (A1,A2,A3) which have all been implemented differently in C++. The basic idea is that I want these agents to automatically communicate with each other... In C++ I've written an A1::command() function that will 'send' sends an IP packet to the A2 agent. When the A2 agent receives this packet, it then sends a packet back to A1, which then gets returned to A2 (basically a 3-way handshake). A2 should then automatically send another packet to the A3 agent by creating a packet, and inserting N3's address in the IP header. (I'm assuming all of my agents and nodes know about the topology) In TCL I've done this: set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set a1 [new Agent/A1] set a2 [new Agent/A2] set a3 [new Agent/A3] $ns attach-agent $n1 $a1 $ns attach-agent $n2 $a2 $ns attach-agent $n3 $a3 $ns connect $a1 $a2 #$ns connect $a2 $a3 ;# if I do this, the handshake doesn't work $ns at 0.0 $a1 send When I run this, ns gives me this error: --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o158: no target for slot 3 _o158 type: Classifier/Port content dump: classifier _o158 0 offset 0 shift 2147483647 mask 1 slots slot 0: _o153 (Agent/A3) -- Finished standard no-slot{} default handler -- Basically I want A3 to look at any or all packets send to N3. How can I force this? I'm using ns-2.29 on Mac OS X 10.4.7. Thanks in advance! Brad On 7/2/06 6:10 PM, Mark Shifrin [EMAIL PROTECTED] wrote: no problem with tcp you can do attach agent as many time as you want to a single node. you must first define it as tcp-source. and then to choose the application which runs over this tcp, for example i did it with FTP. moreover you can do it for n, within a loop --- Brad Montgomery [EMAIL PROTECTED] wrote: Hello All, I'm wondering if it's possible to have a single Agent connected to 2 or more other Agents. I have a topology similar to this: N2 | N0 -- N1 -- N3 -- N4 I have an agents A0, A2, A3 connected to N0, N2, N3 respectively, and I would like A0 to send a packet to A2, which would then in turn send a packet to A3. Is this possible? From reading the mailing list archives, it seems like this may not be possible, so my second question would be this: Is it possible to attach an agent to a Node, and force that agent's recv function to get executed for every packet that passes through that node? For example: Could N2 send a packet to N4, so that A3's recv function processes that packet before sending it onward. Any help is GREATLY appreciated! Brad enjoy the life - Mark __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [ns] Multiple connections to a single agent
The problem is that the packets that you are sending to A3 have an incorrect port address. When you use $ns connect $a1 $a2 then automatically all normal control packets sent by a1 have the destination port of a2; as a1 is not connected to a3 in TCL, you must set the port by hand in C++, as NS will not do this for you, eg: void myAgent::recv(Packet* p, Handler *h) { hdr_ip*iph = hdr_ip::access(p); hdr_cmn *ch = hdr_cmn::access(p); ... iph-saddr() = addr(); // (set my IP address) iph-sport() = port(); // (set my source port) iph-daddr() = nextHop_iaddr; // iaddr of n3 iph-dport() = nextHop_iaddr; // port of a3 regarding the iaddr comment: check http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all possible conversions of each form, using the procs handle2iaddr, handle2haddr, handle2id, etc. you could also have debug this problem by: - redefining the no-slot handler to invoke the run-time TCL debugger; - use the mash inspector to find exactly who are _o153, _o158, etc (http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html) If this helps you, please contribute the description of the problem and the solution, in your own words, to the NS2 wiki. Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brad Montgomery Sent: segunda-feira, 3 de Julho de 2006 19:25 To: ns-users@isi.edu Subject: Re: [ns] Multiple connections to a single agent I'm not sure I understand, and perhaps I've not adequately described what I'm trying to do, so I'll try again using a semi-hypothetical scenario: (Please keep in mind I'm new to ns!) Suppose I've got the following topology: N1 - N2 - N3 And three different agents, (A1,A2,A3) which have all been implemented differently in C++. The basic idea is that I want these agents to automatically communicate with each other... In C++ I've written an A1::command() function that will 'send' sends an IP packet to the A2 agent. When the A2 agent receives this packet, it then sends a packet back to A1, which then gets returned to A2 (basically a 3- way handshake). A2 should then automatically send another packet to the A3 agent by creating a packet, and inserting N3's address in the IP header. (I'm assuming all of my agents and nodes know about the topology) In TCL I've done this: set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set a1 [new Agent/A1] set a2 [new Agent/A2] set a3 [new Agent/A3] $ns attach-agent $n1 $a1 $ns attach-agent $n2 $a2 $ns attach-agent $n3 $a3 $ns connect $a1 $a2 #$ns connect $a2 $a3 ;# if I do this, the handshake doesn't work $ns at 0.0 $a1 send When I run this, ns gives me this error: --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o158: no target for slot 3 _o158 type: Classifier/Port content dump: classifier _o158 0 offset 0 shift 2147483647 mask 1 slots slot 0: _o153 (Agent/A3) -- Finished standard no-slot{} default handler -- Basically I want A3 to look at any or all packets send to N3. How can I force this? I'm using ns-2.29 on Mac OS X 10.4.7. Thanks in advance! Brad On 7/2/06 6:10 PM, Mark Shifrin [EMAIL PROTECTED] wrote: no problem with tcp you can do attach agent as many time as you want to a single node. you must first define it as tcp-source. and then to choose the application which runs over this tcp, for example i did it with FTP. moreover you can do it for n, within a loop --- Brad Montgomery [EMAIL PROTECTED] wrote: Hello All, I'm wondering if it's possible to have a single Agent connected to 2 or more other Agents. I have a topology similar to this: N2 | N0 -- N1 -- N3 -- N4 I have an agents A0, A2, A3 connected to N0, N2, N3 respectively, and I would like A0 to send a packet to A2, which would then in turn send a packet to A3. Is this possible? From reading the mailing list archives, it seems like this may not be possible, so my second question would be this: Is it possible to attach an agent to a Node, and force that agent's recv function to get executed for every packet that passes through that node? For example: Could N2 send a packet to N4, so that A3's recv function processes that packet before sending it onward. Any help is GREATLY appreciated! Brad enjoy the life - Mark __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[ns] Configuring relay number in NS2
Dear all, I am doing some wireless network (802.11a, b, e) simulation by NS2 at present. My main task is to analyse and simulate a modified 802.11 MAC layer which supports 2-hop relaying to optimize network performance. After reading the documents and the paper which written by the people who has already done some similar project in IP layer, there are still several issues I am not quite sure, could anyone else give me some hint? 1. I am still a little bit unclear about how to simulate the 802.11 MAC layer by using NS2, in another word, how can we differentiate the simulation between IP layer and MAC layer? 2. Since my task is to analyse the network performance via 2-hop relay, may I know how can we make sure there is exactly one relay between the source and the destination? Say, in one of my scenarios, there are lots of nodes in the grid (one of them is the AP), there might be lots of nodes between the source node and the AP whilst the source node sends packet to the AP, how can we make sure there is only one node between them to act as a relay to forward the packet from the source to the AP? Any suggestions and comments will be grealy appreciated! Thanks in advance! Regards, Jackie
Re: [ns] Help on obtaining the location info of a mobile node within inC++ code of routing protocol
http://mailman.isi.edu/pipermail/ns-users/2006-January/053450.html http://tagus.inesc-id.pt/~pestrela/ns2/ns2_tips.html#_Toc124667331 http://www.cse.msu.edu/~wangbo1/ns2/nshowto5.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xiaolin Cheng Sent: domingo, 2 de Julho de 2006 8:07 To: ns-users@ISI.EDU; ns-users@ISI.EDU Subject: [ns] Help on obtaining the location info of a mobile node within inC++ code of routing protocol Dear all, I am working on an extension to AODV. I need the location information (x, y, z) of current node to which AODV routing protocol is attached. However, the location information is set in tcl script. How can I obtain this information in C++ code of AODV's implementation? Can I get it from some packet header? Thanks much for yoru attention and help. Xiaolin
Re: [ns] Multiple connections to a single agent
Wiki Information: http://en.wikipedia.org/wiki/Wiki http://en.wikipedia.org/wiki/Wikipedia:Introduction -Original Message- From: Brad Montgomery [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 3 de Julho de 2006 23:14 To: [EMAIL PROTECTED] Subject: Re: [ns] Multiple connections to a single agent Thank You! I'll be sure to post my description on the Wiki site... By the way, are there any guidelines for posting to the Wiki? AFAIK Not yet; the point is the users starting introduce useful informations, to create a better distributed documentation Brad On 7/3/06 2:07 PM, Pedro Vale Estrela [EMAIL PROTECTED] wrote: The problem is that the packets that you are sending to A3 have an incorrect port address. When you use $ns connect $a1 $a2 then automatically all normal control packets sent by a1 have the destination port of a2; as a1 is not connected to a3 in TCL, you must set the port by hand in C++, as NS will not do this for you, eg: void myAgent::recv(Packet* p, Handler *h) { hdr_ip*iph = hdr_ip::access(p); hdr_cmn *ch = hdr_cmn::access(p); ... iph-saddr() = addr(); // (set my IP address) iph-sport() = port(); // (set my source port) iph-daddr() = nextHop_iaddr; // iaddr of n3 iph-dport() = nextHop_iaddr; // port of a3 regarding the iaddr comment: check http://tagus.inesc-id.pt/~pestrela/ns2/ns2_haddr_tips.html In my ns2_shared_procs.tcl utils tcl file, I introduce procs for all possible conversions of each form, using the procs handle2iaddr, handle2haddr, handle2id, etc. you could also have debug this problem by: - redefining the no-slot handler to invoke the run-time TCL debugger; - use the mash inspector to find exactly who are _o153, _o158, etc (http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html) If this helps you, please contribute the description of the problem and the solution, in your own words, to the NS2 wiki. Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brad Montgomery Sent: segunda-feira, 3 de Julho de 2006 19:25 To: ns-users@isi.edu Subject: Re: [ns] Multiple connections to a single agent I'm not sure I understand, and perhaps I've not adequately described what I'm trying to do, so I'll try again using a semi-hypothetical scenario: (Please keep in mind I'm new to ns!) Suppose I've got the following topology: N1 - N2 - N3 And three different agents, (A1,A2,A3) which have all been implemented differently in C++. The basic idea is that I want these agents to automatically communicate with each other... In C++ I've written an A1::command() function that will 'send' sends an IP packet to the A2 agent. When the A2 agent receives this packet, it then sends a packet back to A1, which then gets returned to A2 (basically a 3- way handshake). A2 should then automatically send another packet to the A3 agent by creating a packet, and inserting N3's address in the IP header. (I'm assuming all of my agents and nodes know about the topology) In TCL I've done this: set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set a1 [new Agent/A1] set a2 [new Agent/A2] set a3 [new Agent/A3] $ns attach-agent $n1 $a1 $ns attach-agent $n2 $a2 $ns attach-agent $n3 $a3 $ns connect $a1 $a2 #$ns connect $a2 $a3 ;# if I do this, the handshake doesn't work $ns at 0.0 $a1 send When I run this, ns gives me this error: --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o158: no target for slot 3 _o158 type: Classifier/Port content dump: classifier _o158 0 offset 0 shift 2147483647 mask 1 slots slot 0: _o153 (Agent/A3) -- Finished standard no-slot{} default handler -- Basically I want A3 to look at any or all packets send to N3. How can I force this? I'm using ns-2.29 on Mac OS X 10.4.7. Thanks in advance! Brad On 7/2/06 6:10 PM, Mark Shifrin [EMAIL PROTECTED] wrote: no problem with tcp you can do attach agent as many time as you want to a single node. you must first define it as tcp-source. and then to choose the application which runs over this tcp, for example i did it with FTP. moreover you can do it for n, within a loop --- Brad Montgomery [EMAIL PROTECTED] wrote: Hello All, I'm wondering if it's possible to have a single Agent connected to 2 or more other Agents. I have a topology similar to this: N2 | N0 -- N1 -- N3 -- N4 I have an agents A0, A2, A3 connected to N0, N2, N3 respectively, and I would like A0 to send a packet to A2, which would then in turn send a packet to A3. Is this possible? From
[ns] How to change the transmission range in 802.11 PHY
Dear all, In wireless-phy.cc, it says // Assume ATT's Wavelan PCMCIA card -- Chalermek //Pt_ = 8.5872e-4; // For 40m transmission range. // Pt_ = 7.214e-3; // For 100m transmission range. // Pt_ = 0.2818; // For 250m transmission range. //Pt_ = pow(10, 2.45) * 1e-3; // 24.5 dbm, ~ 281.8mw What is the formula behind these parameters? It seems Pt_ is not inversely proportional to square of transmission range (Pt_1/Pt_2 != d2^2/d1^2). How does it work? If I want a 500m transmission range, what is the transmission power supposed to be? Thanks much for your help.