1 | # |
---|
2 | # Example NS file showing allocation of ProtoGENI backbone nodes |
---|
3 | # |
---|
4 | |
---|
5 | set ns [new Simulator] |
---|
6 | source tb_compat.tcl |
---|
7 | |
---|
8 | # Our three nodes |
---|
9 | set stooges [list "larry" "moe" "curly"] |
---|
10 | |
---|
11 | # Nodes |
---|
12 | set larry [$ns node] |
---|
13 | set moe [$ns node] |
---|
14 | set curly [$ns node] |
---|
15 | |
---|
16 | # Require that the three nodes are in specific I2 POPs |
---|
17 | $larry add-desire "i2-POP-SALT" 1.0 |
---|
18 | $moe add-desire "i2-POP-KANS" 1.0 |
---|
19 | $curly add-desire "i2-POP-WASH" 1.0 |
---|
20 | |
---|
21 | # Links between the nodes (note: the latency value should be set to 0 to avoid |
---|
22 | # getting a delay node inserted) |
---|
23 | set link0 [$ns duplex-link $larry $moe 1000Mbps 0ms DropTail] |
---|
24 | set link1 [$ns duplex-link $larry $curly 1000Mbps 0ms DropTail] |
---|
25 | set link2 [$ns duplex-link $moe $curly 1000Mbps 0ms DropTail] |
---|
26 | |
---|
27 | # Set some parameters for the nodes |
---|
28 | foreach stooge $stooges { |
---|
29 | # This is hardware type of the nodes in the I2 POPs |
---|
30 | tb-set-hardware $stooge pcpg-i2 |
---|
31 | # Right now, this is the OS image with the best support for these nodes |
---|
32 | tb-set-node-os $stooge FEDORA8-STD |
---|
33 | # Install iperf the nodes |
---|
34 | tb-set-node-rpms $stooge "/proj/testbed/ricci/iperf-2.0.2-4.fc8.i386.rpm" |
---|
35 | } |
---|
36 | |
---|
37 | # Turn on routing (statically calculated routes) |
---|
38 | $ns rtproto Static |
---|
39 | |
---|
40 | $ns run |
---|