Re: [ns] important: TCP packet size

2008-04-25 Thread Levinsohn Chris M

Use the following code:

# setup a tcp connection across the n8-n18 link
# create a new tcp agent called tcp818
set tcp818 [new Agent/TCP]
# Set the source to be node n8
$ns attach-agent $n(8) $tcp818
# create a new TCP sink agent called sink
set sink818 [new Agent/TCPSink]
# set the sink to be node n18
$ns attach-agent $n(18) $sink818
# establish the TCP link between node n8 and node n18
$ns connect $tcp818 $sink818
# this assigns a flow indicator so flows can be distinguished in NAM
$tcp818 set fid_ 3
# this sets the packetsize to 1460bytes, the default is 1000bytes.
$tcp818 set packetSize_ 1460

# define an CBR application to go across CBR link cbr818
set cbr818 [new Application/Traffic/CBR]
$cbr818 attach-agent $tcp818
$cbr818 set packetSize_ 1460
$cbr818 set rate_ 200Mb
$cbr818 set random_ false

I have been using CBRs for most of my TCP testing, however if you wanted
to use FTP then the following code should replace the CBR section:

set ftp818 [new Application/FTP]
$ftp818 attach-agent $tcp818

I don't know if it's necessary to set the packetSize for TCP and CBR,
however seeing as there was the option I thought it was safest!
Anyway... it appears to work. There is something worth noting however,
in the trace file the file size will be 1500, as this is the total size
of the IP packet.

Hope this helps!

Chris Levinsohn
Communication Systems Engineer, Comms South 

The information contained in this E-Mail and any subsequent 
correspondence is private and is intended solely for the intended 
recipient(s).  The information in this communication may be 
confidential and/or legally privileged.  Nothing in this e-mail is 
intended to conclude a contract on behalf of QinetiQ or make QinetiQ 
subject to any other legally binding commitments, unless the e-mail 
contains an express statement to the contrary or incorporates a formal Purchase 
Order.

For those other than the recipient any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance 
on such information is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be 
monitored and recorded for business purposes including security, audit 
and archival purposes.  Any response to this email indicates consent 
to this.

Telephone calls to QinetiQ may be monitored or recorded for quality 
control, security and other business purposes.

QinetiQ Limited
Registered in England  Wales: Company Number:3796233
Registered office: 85 Buckingham Gate, London SW1E 6PD, United Kingdom
Trading address: Cody Technology Park, Cody Building, Ively Road, Farnborough, 
Hampshire, GU14 0LX, United Kingdom 
http://www.QinetiQ.com/home/legal.html



Re: [ns] Odd queue size increase with 80MB UDP CBR going over a lossy 100Mb wired link

2008-04-18 Thread Levinsohn Chris M

With reference to this issue I created a small website of my results:

http://www.the-levster.com/NS2/NS2.html

I hope this clears up some confusion for other users as the ErrorModels
do not clearly state what they do in the documentation.

I have included my code on this site just in case I've made a newbie
mistake!

Chris Levinsohn
Communication Systems Engineer, Comms South 


--
The information contained in this E-Mail and any subsequent 
correspondence is private and is intended solely for the intended 
recipient(s).  The information in this communication may be 
confidential and/or legally privileged.  Nothing in this e-mail is 
intended to conclude a contract on behalf of QinetiQ or make QinetiQ 
subject to any other legally binding commitments, unless the e-mail 
contains an express statement to the contrary or incorporates a formal Purchase 
Order.

For those other than the recipient any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance 
on such information is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be 
monitored and recorded for business purposes including security, audit 
and archival purposes.  Any response to this email indicates consent 
to this.

Telephone calls to QinetiQ may be monitored or recorded for quality 
control, security and other business purposes.

QinetiQ Limited
Registered in England  Wales: Company Number:3796233
Registered office: 85 Buckingham Gate, London SW1E 6PD, United Kingdom
Trading address: Cody Technology Park, Cody Building, Ively Road, Farnborough, 
Hampshire, GU14 0LX, United Kingdom 
http://www.QinetiQ.com/home/legal.html



[ns] Odd queue size increase with 80MB UDP CBR going over a lossy 100Mb wired link

2008-04-16 Thread Levinsohn Chris M

Hi,

I have came across an odd issue that has gone against what I thought was
normal UDP behaviour. 

I have set up a network as follows: 

12
OO

I set up Node 1 to be a UDP source and Node 2 to be a UDP Sink. I then
created an 80Mb CBR stream with a packet size of 1472B that would start
at time = 0s and end at time = 20s.

The link has a bandwidth of 100Mb with a link delay of 0.01ms, and the
queue is a DropTail with a queue size of 100,000. 

Now, when I set up an ErrorModel across link 1-2 of 0.01 the queue size
at Node 1 starts to increase, and will keep increasing until it reaches
100,000 (if the scenario was run for a long enough period of time). 

Why, when UDP has no flow control, is there a queue build up at Node 2?

If UDP has no flow control I would expect there to be no queue build up
because an 80Mb stream should have no issue going across a 100Mb link!
The fact that some of the packets are dropped going across the link
shouldn't have an effect on the queue size - or am I mistaken?

I have searched Google and through the mail archives and I have been
unable
to find any mention of this issue anywhere!

Your help with this issue would be greatly appreciated. 

Kind Regards, 

Chris

PS The system I am using is:

Fedora Core 5, Kernel 2.6.15-1.2054
NS-2 2.31
The information contained in this E-Mail and any subsequent 
correspondence is private and is intended solely for the intended 
recipient(s).  The information in this communication may be 
confidential and/or legally privileged.  Nothing in this e-mail is 
intended to conclude a contract on behalf of QinetiQ or make QinetiQ 
subject to any other legally binding commitments, unless the e-mail 
contains an express statement to the contrary or incorporates a formal Purchase 
Order.

For those other than the recipient any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance 
on such information is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be 
monitored and recorded for business purposes including security, audit 
and archival purposes.  Any response to this email indicates consent 
to this.

Telephone calls to QinetiQ may be monitored or recorded for quality 
control, security and other business purposes.

QinetiQ Limited
Registered in England  Wales: Company Number:3796233
Registered office: 85 Buckingham Gate, London SW1E 6PD, United Kingdom
Trading address: Cody Technology Park, Cody Building, Ively Road, Farnborough, 
Hampshire, GU14 0LX, United Kingdom 
http://www.QinetiQ.com/home/legal.html