Modelizing TCP over ATM traffic with Perl 
Author Message
 Modelizing TCP over ATM traffic with Perl

Hello,

I have to put together a script that models a TCP /IP over
AAL5 over ATM connection, by  calculating the pseudorandom
instants when new cells appear.

The inputs would be:

        $PCR      (max allowed number of cells per second)
        $DURATION (seconds of simulation)
and the output should have the form:

T1
T2
T3
...

where 0 < Tn < $DURATION, and all Tn values are scattered in such
a pseudorandom way to mimic as faithfully as possible the real
world bursty behavior of TCP over ATM traffic.

I know that this is subject of lifelong researches, but don't need
the ultimate answers, just something which generates bursts of traffic
satisfying the input parameters ( = some idle period, then burst of
cells never exceeding $PCR, then idle again... with all the idle and
burst periods having random duration too)

I have tried several searches with Google, only to find method to
*parse*
with Perl TCP traffic monitored on real networks.

Suggestions?
Even pointers to models in other languages are OK.

        TIA,
                Marco Fioretti



Sun, 07 Nov 2004 18:06:46 GMT  
 Modelizing TCP over ATM traffic with Perl
Due to near-total ignorance of your problem domain, this may or may
not be of any use to you. At best it's a starting point. I'm sure
the busy-wait could be eliminated if I thought about it a few more
minutes, but have other duties pending...

#!/usr/bin/perl
require 'getopt.pl';
&Getopt('DP');
$DURATION = $opt_D || 10; # -D DURATION otherwise 10 seconds
$PCR = $opt_P || 30; # -P PCR otherwise 30 per second
$maxdelay = 1 / $PCR; # max delay between packets (maybe bad idea)
$current = time(); # seconds since epoch as of now
$end = $current + $DURATION; # compute stop time
while (time() != $end) {
 $count = 0; # packet count
 while (time() == $current && $count < $PCR) {
  select(undef, undef, undef, rand($maxdelay)); # sleep random interval
  print "This is ATM packet $count for second $current\n";
  $count++;
 }
 $current++; # increment to next second
 $count++ until time() == $current; # busy-wait until next second

Quote:
}


: Hello,

: I have to put together a script that models a TCP /IP over
: AAL5 over ATM connection, by  calculating the pseudorandom
: instants when new cells appear.

: The inputs would be:

:       $PCR      (max allowed number of cells per second)
:       $DURATION (seconds of simulation)
: and the output should have the form:

: T1
: T2
: T3
: ...

: where 0 < Tn < $DURATION, and all Tn values are scattered in such
: a pseudorandom way to mimic as faithfully as possible the real
: world bursty behavior of TCP over ATM traffic.

: I know that this is subject of lifelong researches, but don't need
: the ultimate answers, just something which generates bursts of traffic
: satisfying the input parameters ( = some idle period, then burst of
: cells never exceeding $PCR, then idle again... with all the idle and
: burst periods having random duration too)

: I have tried several searches with Google, only to find method to
: *parse*
: with Perl TCP traffic monitored on real networks.

: Suggestions?
: Even pointers to models in other languages are OK.

:       TIA,
:               Marco Fioretti
--
John Otis Lene Comeau

http://world.std.com/~jcomeau



Mon, 08 Nov 2004 02:01:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ATM network simulator written in PERL

2. ATM network card question

3. * Perl vs. Java in high-traffic Website *

4. Propossal for new group to drop traffic in comp.lang.perl.misc

5. Newbee: How to Monitor NNTP Traffic in Perl?

6. Increase Traffic...Post Free Links

7. OT: Traffic

8. sybperl, xperl, perl 5, tcp perl?

9. MRGT: Multi Router Traffic Grapher Version 1.6

10. SOFTWARE: mrtg - Multi Router Traffic Grapher (1.1)

11. ANNOUNCE: mrtg - Network Traffic Stats on the Web

 

 
Powered by phpBB® Forum Software