Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Attachment / Pgeninodes / Backbone.Ns

Backbone.Ns

Plain Text icon — Plain Text, 1 KB (1165 bytes)

File contents

#
# Example NS file showing allocation of ProtoGENI backbone nodes
#

set ns [new Simulator]
source tb_compat.tcl

# Our three nodes
set stooges [list "larry" "moe" "curly"]

# Nodes
set larry [$ns node]
set moe [$ns node]
set curly [$ns node]

# Require that the three nodes are in specific I2 POPs
$larry add-desire "i2-POP-SALT" 1.0
$moe add-desire "i2-POP-KANS" 1.0
$curly add-desire "i2-POP-WASH" 1.0

# Links between the nodes (note: the latency value should be set to 0 to avoid
# getting a delay node inserted)
set link0 [$ns duplex-link $larry $moe 1000Mbps 0ms DropTail]
set link1 [$ns duplex-link $larry $curly 1000Mbps 0ms DropTail]
set link2 [$ns duplex-link $moe $curly 1000Mbps 0ms DropTail]

# Set some parameters for the nodes
foreach stooge $stooges {
    # This is hardware type of the nodes in the I2 POPs
    tb-set-hardware $stooge pcpg-i2
    # Right now, this is the OS image with the best support for these nodes
    tb-set-node-os $stooge FEDORA8-STD
    # Install iperf the nodes
    tb-set-node-rpms $stooge "/proj/testbed/ricci/iperf-2.0.2-4.fc8.i386.rpm"
}

# Turn on routing (statically calculated routes)
$ns rtproto Static

$ns run