Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Attachment / Tutorial / Batch.Ns

Batch.Ns

Plain Text icon — Plain Text, 1 KB

File contents

set ns [new Simulator]			
source tb_compat.tcl

# Two nodes
set nodeA [$ns node]
set nodeB [$ns node]

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

# Set the OS.
tb-set-node-os $nodeA FBSD-STD
tb-set-node-os $nodeB RHL-STD
	
# Load our software.
tb-set-node-tarfiles $nodeA /usr/site /proj/testbed/tarfiles/silly.tar.gz
tb-set-node-tarfiles $nodeB /usr/site /proj/testbed/tarfiles/silly.tar.gz

# Set the commands to run 
tb-set-node-startcmd $nodeA "/usr/site/bin/run-silly >& /tmp/foo.log"
tb-set-node-startcmd $nodeB "/usr/site/bin/run-silly >& /tmp/foo.log"

$ns run