[ns] R: Re: R: two equal UDP CBR flows in droptail queue get different bandwidths?
Eduardo, the flag simply introduces a random delay to each packet (i. e. the CBR sources does not send 1 pkt ever T seconds, but every T+random(-T/2,T/2). I am not sure about the random interval, but this is the way it works, and it is useful to avoid that the two sources transmit at the same *exact* time. Regards, Marco Fiore Messaggio originale Da: [EMAIL PROTECTED] Data: 8-giu-2006 5.09 AM A: Marco Fiore[EMAIL PROTECTED] Ogg: Re: R: [ns] two equal UDP CBR flows in droptail queue get different bandwidths? That does this flag do exactly? On Wednesday 07 June 2006 08:39, Marco Fiore wrote: Eduardo, it could be a synchronization issue. Try to avoid synchronization between flows by setting the random flag of the cbr flows to true: $cbr_name set random_ 1. Regards, Marco Fiore Messaggio originale Da: [EMAIL PROTECTED] Data: 7-giu-2006 3.00 PM A: ns-users@ISI.EDU Ogg: [ns] two equal UDP CBR flows in droptail queue get differentbandwidths? Hi there: I've set up this experiment. I have two source nodes S1 and S2 directly connected to a node R1 and two destination nodes D1 and D2 also directly connected to a node R2. Nodes R1 and R2 are connected. All links are 1 Mb/s Full duplex with DropTail. Now, here's the thing. I set up two flows, one going from S1 to D1 and the other one form S2 to D2. Both flows are UDP CBR 1 Mb/s. Flow 1 starts at t=0 and finishes at t=20. flow 2 starts at t=10 and stops at t=15. Sim runs from t=0 to t=25. I'd expect that at t=10 (when flow 2 starts), both flows would experience the same amount of packet losses, so that each one would use about 0.5Mb/s of the link between R1 and R2. But what really happens is that from t=10 to t=15, flow 2 uses all bandwidth while flow 1 loses all packets. Since both flows have the same parameters, shouldn't they receive the same share of bandwidth during that period? Or am i missing something here? Thanks in advance. -- Eduardo J. Ortega - Linux user #222873 No fake - I'm a big fan of konqueror, and I use it for everything. -- Linus Torvalds -- Eduardo J. Ortega - Linux user #222873 No fake - I'm a big fan of konqueror, and I use it for everything. -- Linus Torvalds
[ns] DSR - linkcache.cc
Hi all, For some reason when I call trace() from linkcache.cc it does not get logged in the trace file. I don't have this problem from say routecache.cc. verbose_debug is set to true, and RTR and AGT trace in the Tcl file are both switched on. Can anyone tell me what I am doing wrong? Cheers, Amer University of Western Australia
Re: [ns] Sending Pings without connecting agents together
Hi, Its not difficult to code such a Ping Agent which would send packets without getting connected. Actually when u call connect for agents, the address gets associated (daddr, dport) so u dont need to set these values when u create a new packet. When agents are connected, what u do is call allocpkt(), set the ping header fields and call send. Address are already associated and the IP header fields are set properly due to connect. So if u dont want to connect the agents, first write a new command in the ping.cc. I named it sendto and while calling this command you also need to send the daddr and the dport values for the destination agent. Inside the sendto code in ping.cc you can access these values using the argument vector argv. This time when u create a pkt using allocpkt, also create a pointer to the IP header and set the values using the functions daddr(), dport(), saddr(), sport() of the ip_header. When u send the packet now, it will be received by the ping agent at node with the corresponding address and port. Also u need to modify the recv function since the existing one doesnt associate address. In the recv, you need to set the address for the reply packet again using pointer to the ip headers. I mean the saddr() for reply packet will be the daddr() of the received packet, daddr() for the reply will be the saddr() of the received packet, and similarly for the port fields.. This is relly a basic task and its not difficult.. still if u find any problems with it... write it back.. Regards, Sanjay Raghani MTech CSE Indian Institute of Technology, Roorkee India -- Message: 14 Date: Thu, 8 Jun 2006 01:09:08 +0330 From: Saeed B [EMAIL PROTECTED] Subject: [ns] Sending Pings without connecting agents together To: ns-users@ISI.EDU Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=UTF-8; format=flowed Dear All, Hi, I saw an email in ns-users mailing list ( http://mailman.isi.edu/pipermail/ns-users/2001-May/014861.html ) in which someone asked for the modified version of Marc Greis's Ping code that could send pings simply using a code like: '$pa send $node' instead of making two instances of ping agent and connecting them together. ( Greis's code is available at: http://www.isi.edu/nsnam/ns/tutorial/nsnew.html ) Does anyone know the answer? I need it as part of my thesis, and this will help so much. So, if you know how to do such a kind of task, it will be very kind of you letting me know too. Thanks in advance, --Saeed. --
[ns] Fw: need help running NS
Hello all, I am a BEGGINER using NS, but I haven't been able to run it yet... I have taken a look at the troubleshooting and help page, but none of the answers there have helped me so far. After positioning myself in the directory where NS is installed (ns-allinone-2.29 version in my case) I try to execute Marc Greis's examples by typing: ns example1a.tcl but I always get the same message: example1a.tcl does not exist, try again However, If I open with the text editor, such as emacs, by typing: emacs example1a.tcl the file is found and emacs does open it, what has led me to believe that the problem is with NS itself. I have made sure that my bashrc has the propper configuration: export PATH=/usr/local/ns-allinone-2.29/bin:/usr/local/ns-allinone-2.29/tcl8.4.11/unix:/usr/local/ns-allinone-2.29/tk8.4.11/unix:$PATH export LD_LIBRARY_PATH=/usr/local/ns-allinone-2.29/otcl-1.11:/usr/local/ns-allinone-2.29/lib:$LD_LIBRARY_PATH export TCL_LIBRARY=/usr/local/ns-allinone-2.29/tcl8.4.11/library After taking these steps, I really don't know where else to keep looking for things that I could be doing wrong. Does anybody know what could it be? Thanks in advance, Ignacio - Réacheminé par Ignacio Martinez Serrano/France/RockwellCollins le 08/06/2006 17:08 - [EMAIL PROTECTED] 08/06/2006 15:05 A [EMAIL PROTECTED] cc Objet Re: need help running NS Welcome to posting to the ns-users mailing list! We automatically send this message to every new person who sends mail to the list. You should only receive it once. My apologies if the program contacts you twice, perhaps because you have multiple e-mail addresses or send mail from multiple machines. If you are an experienced ns-user who simply has not posted since we started using this responder, our apologies for inconveniencing you with this message. This message is intended to help inform users and cut down on redundant posts, which benefits everyone. Please look at the attached list of ns Frequently Asked Questions. If it answers your question, great! You're done. If not, please RE-SEND your original message to [EMAIL PROTECTED] A copy of your original message is included below for reference. You will NOT have to do re-send your message every time you post, only the FIRST time you send from a new account. The goal is to quickly help new users find the FAQ (hopefully answering their question). Thanks, -the ns development team The Network Simulator ns-2: Frequently Asked Questions (This FAQ is also on the web at http://www.isi.edu/nsnam/ns/ns-faq.html.) * _Where do I get ns?_ From the ns web site at http://www.isi.edu/nsnam/ns/ns.html and the download page http://www.isi.edu/nsnam/ns/ns-tests.html. * _What platforms does ns run on and what kind of hardware do I need?_ Please see where to start on the building ns web page: http://www.isi.edu/nsnam/ns/ns-build.html#start. * _What should I do if I have trouble downloading/extracting ns?_ This question is answered in detail at http://www.isi.edu/nsnam/ns/ns-problems.html#downloading. * _What should I do if I encounter problems building ns?_ Check: 1. the README that comes in the distribution (very brief), 2. the installation problems, bug fixes and help web page http://www.isi.edu/nsnam/ns/ns-problems.html, 3. the archives of the ns-users mailing list http://www.isi.edu/nsnam/ns/ns-lists.html, 4. post a bug report (see below) http://www.isi.edu/cgi-bin/nsnam/reportbug.cgi. * _What do I do after I successfully build ns?_ + Put the path to your ns executable into your PATH environment + Put the path to your otcl into your LD_LIBRARY_PATH environment + Put the path to your tcl library into your TCL_LIBRARY environment * _Where can I find documentation for ns?_ All documentation is linked from the main ns web page http://www.isi.edu/nsnam/ns/. Documentation includes a tutorial (originally from Marc Greis) and a reference manual (ns notes and documentation). * _Words, words, words... that documentation is nice, but where are some sample scripts I can start from?_ Many sample scripts can be found in the ns distribution in ~ns-2/tcl/ex and ~ns-2/tcl/test. * _What protocols does ns support?_ A lot! Almost all variants of TCP, several forms of multicast, wired networking, several ad hoc routing protocols and propagation models (but not cellular phones), data diffusion, satellite, and other stuff. See the documentation (described above) for details, or download ns and look. * _How do I know that ns correctly implements these protocols?_
Re: [ns] two equal UDP CBR flows in droptail queue get different bandwidths?
In reality, sure. What's happening with the simulation though, is that the packets are being sent at the same time. Even though you start the flows sending at t=0 and t=10, when they're both sending, they're sending at the exact same instant. Since internally, everything is handled in a fixed order and nothing is random unless you explicitly make it so, it will always drop the packets from the same source at the same time. Not because it picked the packets from that source to drop, but because that's just the order of things. And once you see how it works for one packet being dropped, the same thing will repeat itself over and over, since no variables are changing. I don't know if that makes sense. Think on the level of one packet (from each source). As you pointed out, the two flows have EXACTLY the same characteristics. So they leave the source at the same time, they take the same amount of time to travel down their respective links, and they arrive at the relay node at the EXACT same time. Problem is, only one packet can actually ride the next link. Yes, they will queue up until the queue is full. Then what? Which one is accepted into queue? Which is dropped? You know that DropTail has no fairness. So it's NOT going to pick the packet from the flow that was dropped last time. It's NOT going to pick one at random. So how will the simulator decide? If you have an array with all the packets and you loop over them, then the first one it comes across gets to join the queue. So which one gets to join the queue is determined by its internal order. Since nothing in the simulation is being changed in your simulation... you can do the same thing 1000 times, and the same thing will happen. So the next time a packet comes along, the same packet will be let through. The only way to change this result is to introduce some randomness to the sending order or to modify the how packets are queued. An even better idea is to prevent packets from being lost in the first place. :) Eduardo J. Ortega wrote: I understand that Droptail knows nothing about fairness. But, on the average, and given the fact that both flows have exactly the same characteristics, shouldn't they experience the same average behaviour? thanks. On Wednesday 07 June 2006 08:35, Tyler Ross wrote: This phenomenon is explained in the tutorial in Marc Greis's tutorial on the ns-2 website (see http://www.isi.edu/nsnam/ns/tutorial/nsscript2.html ). The queue that you're probably using is a DropTail. The DropTail queue has no concept of fairness, so it's going to drop whatever packet happens to be there. If you want some kind of fairness, you can do as the tutorial suggests, and replace DropTail with SFQ in your simulation. You will then get a fairer split of the bandwidth. If you monitor the queue and the dropped packets, you will indeed see that they are queued and dropped in a much more equal way. Eduardo J. Ortega wrote: Hi there: I've set up this experiment. I have two source nodes S1 and S2 directly connected to a node R1 and two destination nodes D1 and D2 also directly connected to a node R2. Nodes R1 and R2 are connected. All links are 1 Mb/s Full duplex with DropTail. Now, here's the thing. I set up two flows, one going from S1 to D1 and the other one form S2 to D2. Both flows are UDP CBR 1 Mb/s. Flow 1 starts at t=0 and finishes at t=20. flow 2 starts at t=10 and stops at t=15. Sim runs from t=0 to t=25. I'd expect that at t=10 (when flow 2 starts), both flows would experience the same amount of packet losses, so that each one would use about 0.5Mb/s of the link between R1 and R2. But what really happens is that from t=10 to t=15, flow 2 uses all bandwidth while flow 1 loses all packets. Since both flows have the same parameters, shouldn't they receive the same share of bandwidth during that period? Or am i missing something here? Thanks in advance.
Re: [ns] two equal UDP CBR flows in droptail queue get different bandwidths?
This is an EXCELENT description of what happens in a non-randomized simulation, and from my experience, I fully agree on that. It is exactly this kind of material that would be very useful for the NS2 Wiki, to store this information permanently! As such, somebody on this list please contribute it to the NS2 wiki pages! Pedro Vale Estrela -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tyler Ross Sent: quinta-feira, 8 de Junho de 2006 16:43 To: Eduardo J. Ortega Cc: ns-users@ISI.EDU Subject: Re: [ns] two equal UDP CBR flows in droptail queue get different bandwidths? In reality, sure. What's happening with the simulation though, is that the packets are being sent at the same time. Even though you start the flows sending at t=0 and t=10, when they're both sending, they're sending at the exact same instant. Since internally, everything is handled in a fixed order and nothing is random unless you explicitly make it so, it will always drop the packets from the same source at the same time. Not because it picked the packets from that source to drop, but because that's just the order of things. And once you see how it works for one packet being dropped, the same thing will repeat itself over and over, since no variables are changing. I don't know if that makes sense. Think on the level of one packet (from each source). As you pointed out, the two flows have EXACTLY the same characteristics. So they leave the source at the same time, they take the same amount of time to travel down their respective links, and they arrive at the relay node at the EXACT same time. Problem is, only one packet can actually ride the next link. Yes, they will queue up until the queue is full. Then what? Which one is accepted into queue? Which is dropped? You know that DropTail has no fairness. So it's NOT going to pick the packet from the flow that was dropped last time. It's NOT going to pick one at random. So how will the simulator decide? If you have an array with all the packets and you loop over them, then the first one it comes across gets to join the queue. So which one gets to join the queue is determined by its internal order. Since nothing in the simulation is being changed in your simulation... you can do the same thing 1000 times, and the same thing will happen. So the next time a packet comes along, the same packet will be let through. The only way to change this result is to introduce some randomness to the sending order or to modify the how packets are queued. An even better idea is to prevent packets from being lost in the first place. :) Eduardo J. Ortega wrote: I understand that Droptail knows nothing about fairness. But, on the average, and given the fact that both flows have exactly the same characteristics, shouldn't they experience the same average behaviour? thanks. On Wednesday 07 June 2006 08:35, Tyler Ross wrote: This phenomenon is explained in the tutorial in Marc Greis's tutorial on the ns-2 website (see http://www.isi.edu/nsnam/ns/tutorial/nsscript2.html ). The queue that you're probably using is a DropTail. The DropTail queue has no concept of fairness, so it's going to drop whatever packet happens to be there. If you want some kind of fairness, you can do as the tutorial suggests, and replace DropTail with SFQ in your simulation. You will then get a fairer split of the bandwidth. If you monitor the queue and the dropped packets, you will indeed see that they are queued and dropped in a much more equal way. Eduardo J. Ortega wrote: Hi there: I've set up this experiment. I have two source nodes S1 and S2 directly connected to a node R1 and two destination nodes D1 and D2 also directly connected to a node R2. Nodes R1 and R2 are connected. All links are 1 Mb/s Full duplex with DropTail. Now, here's the thing. I set up two flows, one going from S1 to D1 and the other one form S2 to D2. Both flows are UDP CBR 1 Mb/s. Flow 1 starts at t=0 and finishes at t=20. flow 2 starts at t=10 and stops at t=15. Sim runs from t=0 to t=25. I'd expect that at t=10 (when flow 2 starts), both flows would experience the same amount of packet losses, so that each one would use about 0.5Mb/s of the link between R1 and R2. But what really happens is that from t=10 to t=15, flow 2 uses all bandwidth while flow 1 loses all packets. Since both flows have the same parameters, shouldn't they receive the same share of bandwidth during that period? Or am i missing something here? Thanks in advance.
[ns] Help running a NS script
Hi, I'm really a NS beginner. I installed NS-allinone-2.29 by Cygwin on WindowsXP and then I downloaded example1.tcl from Marc Grei's tutorial pages but I have problem processing it. This is the error when I launch ns example1a.tcl: ns: finish: couldn't execute nam: permission denied while executing exec nam out.nam (procedure finish line 7) invoked from within finish Can you help me? Sorry for my poor english. Andrea.