1 | source tb_compat.tcl |
---|
2 | set ns [new Simulator] |
---|
3 | |
---|
4 | # Create the center node (named by its variable name) |
---|
5 | set center [$ns node] |
---|
6 | # The center node is a process |
---|
7 | tb-add-node-attribute $center containers:node_type process |
---|
8 | tb-add-node-attribute $center containers:openvz_template ubuntu-12.04-x86_64 |
---|
9 | |
---|
10 | # Connect 9 satellites |
---|
11 | for { set i 0} { $i < 9 } { incr i} { |
---|
12 | # Create node n-1 (tcl n($i) becomes n-$i in the experiment) |
---|
13 | set n($i) [$ns node] |
---|
14 | # Set satellite disk sizes to be 20 GB |
---|
15 | tb-add-node-attribute $n($i) containers:openvz_diskspace 20G |
---|
16 | # Connect center to $n($i) |
---|
17 | ns duplex-link $center $n($i) 100Mb 10ms DropTail |
---|
18 | } |
---|
19 | |
---|
20 | # Creation boilerplate |
---|
21 | $ns rtptoto Static |
---|
22 | $ns run |
---|