README 1.74 KB
Newer Older
1 2 3 4 5 6 7 8
The web documentation supersedes this README file wrt incorporating
simulated nodes in your experiment

1) You need to explicitly do a "gmake buildnse" in
<builddir>/event/nsetrafgen directory
2) You need the image FBSD-NSE 

****************************************
9
For NSE integration and traffic generation, we need the following files
10 11 12 13
as part of the FBSD disk image or it should be part of 
/usr/testbed/sup/sup/FBSD43-STD/root*/etc/testbed on the boss node.

a) nseinput.tcl and startnse present in this directory
14 15
b) NSE executable file. To build it the first time, chdir to
   this directory. Then do a
16

17 18 19
   ./nse-install

c) Then do a
20
   cp nse nseinput.tcl startnse <sup_directory>
21

22 23 24
The current NSE trafgen comes with a major caveat:

0) It comes with all the bugs and idiosyncrasies of the FullTcp, FTP and
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
   Telnet models in NS.

Here is an example scenario:

source tb_compat.tcl
set ns [new Simulator]

#Create four nodes
set nodeA [$ns node]
set nodeB [$ns node]

$ns duplex-link $nodeA $nodeB 100Mb 0ms DropTail

##### ftp0
set tcp0 [new Agent/TCP/FullTcp/Tahoe]
$ns attach-agent $nodeA $tcp0
set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0

set tcp1 [new Agent/TCP/FullTcp/Sack]
$ns attach-agent $nodeB $tcp1
$tcp1 listen

#Connect the traffic sources with the traffic sink
$ns connect $tcp0 $tcp1  

##### telnet0
set tcp2 [new Agent/TCP/FullTcp/Newreno]
$ns attach-agent $nodeB $tcp2
set telnet0 [new Application/Telnet]
$telnet0 attach-agent $tcp2

set tcp3 [new Agent/TCP/FullTcp]
$tcp3 listen
$ns attach-agent $nodeA $tcp3

$ns connect $tcp2 $tcp3

63 64 65 66 67 68
$ns at 30.0 "$ftp0 start"
$ns at 120.0 "$ftp0 stop"
$ns at 60.0 "$telnet0 start"
$ns at 90.0 "$tcp2 set segsize_ 256; $tcp3 set segsize_ 512"
$ns at 150.0 "$telnet0 stop"

69 70
#Run the simulation
$ns run