Re: [ns] What is Packet Interval !!

2008-10-28 Thread Teerawat Issariyakul


Hi,

If you are talking about the time that you need to transmit packet, it is
actually defined by two things 1) packet size and 2) link
characteristics.

There is a detailed explanation of the packets and the scheduling (and
timers) in the book from Springer:

T. Issaraiyakul and E. Hossain, Introduction to Network Simulator
NS2, Springer 2008.

Here is the link:
http://www.springer.com/engineering/signals/book/978-0-387-71759-3

You might also find the following slide useful:
http://www.ece.ubc.ca/~teerawat/NS2.htmhttp://www.ece.ubc.ca/%7Eteerawat/NS2.htm


The following might be useful to you:

You can see the default packet size in the file ns-default.tcl (chapter
3). The packet size is different from one protocol to another. For
example, for TCP,

Agent/TCP set packetSize_ 1000

The second part depends on what link layer you are using. In a wired
network, the link layer delay is defined in a variable link_ of class
SimpleLink (chapter 7). This variable is bound to C++ class  LinkDelay.
It schedule two events: 1) the packets leave one place, and 2) the
packet arrive at another place. Class LinkDelay has variables bandwidth_
and delay_ (propagation delay). Based on these two variable as well as
the packet size, you can compute the packet interval.

Hope this would be helpful.

Best,
Teerawat

On 10/27/2008, Mathiew Moussa [EMAIL PROTECTED] wrote:


Hi Jianliang,

Thanks for the prompt reply, i appreciate it.

I was wondering .. ok i'm in the ns-default.tcl file ... but there's  
nothing called 'packet interval'. Does have a different name or  
terminology, where is it located in the file ?
And what does it exactly 'packet interval' , is it like TTL ?

and about adding it to the MY tcl as an alternative to the above, can  
you give me an example or how to add it.

Excuse me but I'm new at NS2 and details are important :)

Thanks Alot.
Mathiew





Quoting J GAO/Jianliang GAO [EMAIL PROTECTED]:

 Hi Mathiew,
  You can change Packet Interval value in the file ns-default.tcl in   
 folder ns-2.xx\tcl\lib. However, it is not so convenient to change   
 the value of interval by modifying ns-default.tcl every time you   
 test your code in different interval time. There is an alternative   
 way to change the value of interval. You can change the value in   
 your own .tcl code in the corresponding part of code of traffic you   
 use. Obviously, this way facilitates your test.
   To find out what exact reason causes the error, using ddd or gdb   
 to debug and track the code is very helpful.
   Regards,



 J GAO/Jianliang GAO
 2008-10-27



 发件人: Mathiew Moussa
 发送时间: 2008-10-27 16:34:13
 收件人: ns-users@ISI.EDU
 抄送:
 主题: [ns] What is Packet Interval !!


 Hi All ns-users,

 Does anyone know what Packet Interval in NS2 is and WHERE can when
 change it.

 you see im using the SMAC and it was giving me an error Couldn't
 Schedule Timer after i ran my TCL script .. I got an answer from one
 of the guys that it might possibly have to do with the packet interval.

 Thanks in Advance.

 Mathiew









[ns] What is Packet Interval !!

2008-10-27 Thread Mathiew Moussa

Hi All ns-users,

Does anyone know what Packet Interval in NS2 is and WHERE can when
change it.

you see im using the SMAC and it was giving me an error Couldn't
Schedule Timer after i ran my TCL script .. I got an answer from one
of the guys that it might possibly have to do with the packet interval.

Thanks in Advance.

Mathiew



Re: [ns] What is Packet Interval !!

2008-10-27 Thread Mathiew Moussa

Hi Jianliang,

Thanks for the prompt reply, i appreciate it.

I was wondering .. ok i'm in the ns-default.tcl file ... but there's  
nothing called 'packet interval'. Does have a different name or  
terminology, where is it located in the file ?
And what does it exactly 'packet interval' , is it like TTL ?

and about adding it to the MY tcl as an alternative to the above, can  
you give me an example or how to add it.

Excuse me but I'm new at NS2 and details are important :)

Thanks Alot.
Mathiew





Quoting J GAO/Jianliang GAO [EMAIL PROTECTED]:

 Hi Mathiew,
  You can change Packet Interval value in the file ns-default.tcl in   
 folder ns-2.xx\tcl\lib. However, it is not so convenient to change   
 the value of interval by modifying ns-default.tcl every time you   
 test your code in different interval time. There is an alternative   
 way to change the value of interval. You can change the value in   
 your own .tcl code in the corresponding part of code of traffic you   
 use. Obviously, this way facilitates your test.
   To find out what exact reason causes the error, using ddd or gdb   
 to debug and track the code is very helpful.
   Regards,



 J GAO/Jianliang GAO
 2008-10-27



 发件人: Mathiew Moussa
 发送时间: 2008-10-27 16:34:13
 收件人: ns-users@ISI.EDU
 抄送:
 主题: [ns] What is Packet Interval !!


 Hi All ns-users,

 Does anyone know what Packet Interval in NS2 is and WHERE can when
 change it.

 you see im using the SMAC and it was giving me an error Couldn't
 Schedule Timer after i ran my TCL script .. I got an answer from one
 of the guys that it might possibly have to do with the packet interval.

 Thanks in Advance.

 Mathiew