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 | |
---|
9 | # Connect 9 satellites |
---|
10 | for { set i 0} { $i < 9 } { incr i} { |
---|
11 | # Create node n-1 (tcl n($i) becomes n-$i in the experiment) |
---|
12 | set n($i) [$ns node] |
---|
13 | # Satellites are qemu nodes |
---|
14 | tb-add-node-attribute $n($i) containers:node_type qemu |
---|
15 | # Connect center to $n($i) |
---|
16 | ns duplex-link $center $n($i) 100Mb 10ms DropTail |
---|
17 | } |
---|
18 | |
---|
19 | # Creation boilerplate |
---|
20 | $ns rtptoto Static |
---|
21 | $ns run |
---|