Ticket #199: backbone.ns

File backbone.ns, 1.1 KB (added by ricci@cs.utah.edu, 15 years ago)

Example Emulab NS file which can be used to provision VLANs and PCs on Internet2 backbone

Line 
1#
2# Example NS file showing allocation of ProtoGENI backbone nodes
3#
4
5set ns [new Simulator]
6source tb_compat.tcl
7
8# Our three nodes
9set stooges [list "larry" "moe" "curly"]
10
11# Nodes
12set larry [$ns node]
13set moe [$ns node]
14set 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)
23set link0 [$ns duplex-link $larry $moe 1000Mbps 0ms DropTail]
24set link1 [$ns duplex-link $larry $curly 1000Mbps 0ms DropTail]
25set link2 [$ns duplex-link $moe $curly 1000Mbps 0ms DropTail]
26
27# Set some parameters for the nodes
28foreach 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