1 | source tb_compat.tcl |
---|
2 | set ns [new Simulator] |
---|
3 | |
---|
4 | set center [$ns node] |
---|
5 | tb-add-node-attribute $center "containers:PartitionPass" 0 |
---|
6 | |
---|
7 | |
---|
8 | for { set i 0} { $i < 3 } { incr i} { |
---|
9 | set lanlist $center |
---|
10 | for { set j 0 } { $j < 20} { incr j } { |
---|
11 | set idx [expr $i * 20 + $j] |
---|
12 | set n($idx) [$ns node] |
---|
13 | tb-add-node-attribute $n($idx) "containers:PartitionPass" [expr $i + 1] |
---|
14 | lappend lanlist $n($idx) |
---|
15 | } |
---|
16 | set lan($i) [$ns make-lan [join $lanlist " "] 100Mb 0] |
---|
17 | } |
---|
18 | |
---|
19 | # Creation boilerplate |
---|
20 | $ns rtptoto Static |
---|
21 | $ns run |
---|