1 | |
---|
2 | set ns [new Simulator] |
---|
3 | source tb_compat.tcl |
---|
4 | |
---|
5 | set r(0) [$ns node] |
---|
6 | tb-set-node-os ${r(0)} FBSD8-STD |
---|
7 | |
---|
8 | set r(1) [$ns node] |
---|
9 | tb-set-node-os ${r(1)} FBSD8-STD |
---|
10 | |
---|
11 | set r(2) [$ns node] |
---|
12 | tb-set-node-os ${r(2)} FBSD8-STD |
---|
13 | |
---|
14 | set r(3) [$ns node] |
---|
15 | tb-set-node-os ${r(3)} FBSD8-STD |
---|
16 | |
---|
17 | set leaf0 [$ns node] |
---|
18 | tb-set-node-os ${leaf0} Ubuntu1204-64-STD |
---|
19 | |
---|
20 | set leaf1 [$ns node] |
---|
21 | tb-set-node-os ${leaf1} Ubuntu1204-64-STD |
---|
22 | |
---|
23 | set leaf2 [$ns node] |
---|
24 | tb-set-node-os ${leaf2} Ubuntu1204-64-STD |
---|
25 | |
---|
26 | set leaf3 [$ns node] |
---|
27 | tb-set-node-os ${leaf3} Ubuntu1204-64-STD |
---|
28 | |
---|
29 | set leaf4 [$ns node] |
---|
30 | tb-set-node-os ${leaf4} Ubuntu1204-64-STD |
---|
31 | |
---|
32 | set leaf5 [$ns node] |
---|
33 | tb-set-node-os ${leaf5} Ubuntu1204-64-STD |
---|
34 | |
---|
35 | set leaf6 [$ns node] |
---|
36 | tb-set-node-os ${leaf6} Ubuntu1204-64-STD |
---|
37 | |
---|
38 | set leaf7 [$ns node] |
---|
39 | tb-set-node-os ${leaf7} Ubuntu1204-64-STD |
---|
40 | |
---|
41 | set leaf8 [$ns node] |
---|
42 | tb-set-node-os ${leaf8} Ubuntu1204-64-STD |
---|
43 | |
---|
44 | set leaf9 [$ns node] |
---|
45 | tb-set-node-os ${leaf9} Ubuntu1204-64-STD |
---|
46 | |
---|
47 | set leaf10 [$ns node] |
---|
48 | tb-set-node-os ${leaf10} Ubuntu1204-64-STD |
---|
49 | |
---|
50 | set leaf11 [$ns node] |
---|
51 | tb-set-node-os ${leaf11} Ubuntu1204-64-STD |
---|
52 | |
---|
53 | set rlink0 [$ns make-lan "${r(0)} ${r(1)}" 100000.000000kb 0.000000ms ] |
---|
54 | |
---|
55 | set rlink1 [$ns make-lan "${r(0)} ${r(2)}" 100000.000000kb 0.000000ms ] |
---|
56 | |
---|
57 | set rlink2 [$ns make-lan "${r(0)} ${r(3)}" 100000.000000kb 0.000000ms ] |
---|
58 | |
---|
59 | set rlink3 [$ns make-lan "${r(1)} ${r(2)}" 100000.000000kb 0.000000ms ] |
---|
60 | |
---|
61 | set rlink4 [$ns make-lan "${r(1)} ${r(3)}" 100000.000000kb 0.000000ms ] |
---|
62 | |
---|
63 | set rlink5 [$ns make-lan "${r(2)} ${r(3)}" 100000.000000kb 0.000000ms ] |
---|
64 | |
---|
65 | set llink0 [$ns make-lan "${r(0)} ${leaf0}" 100000.000000kb 0.000000ms ] |
---|
66 | |
---|
67 | set llink1 [$ns make-lan "${r(0)} ${leaf1}" 100000.000000kb 0.000000ms ] |
---|
68 | |
---|
69 | set llink2 [$ns make-lan "${r(0)} ${leaf2}" 100000.000000kb 0.000000ms ] |
---|
70 | |
---|
71 | set llink3 [$ns make-lan "${r(0)} ${leaf3}" 100000.000000kb 0.000000ms ] |
---|
72 | |
---|
73 | set llink4 [$ns make-lan "${r(1)} ${leaf4}" 100000.000000kb 0.000000ms ] |
---|
74 | |
---|
75 | set llink5 [$ns make-lan "${r(1)} ${leaf5}" 100000.000000kb 0.000000ms ] |
---|
76 | |
---|
77 | set llink6 [$ns make-lan "${r(1)} ${leaf6}" 100000.000000kb 0.000000ms ] |
---|
78 | |
---|
79 | set llink7 [$ns make-lan "${r(1)} ${leaf7}" 100000.000000kb 0.000000ms ] |
---|
80 | |
---|
81 | set llink8 [$ns make-lan "${r(2)} ${leaf8}" 100000.000000kb 0.000000ms ] |
---|
82 | |
---|
83 | set llink9 [$ns make-lan "${r(2)} ${leaf9}" 100000.000000kb 0.000000ms ] |
---|
84 | |
---|
85 | set llink10 [$ns make-lan "${r(2)} ${leaf10}" 100000.000000kb 0.000000ms ] |
---|
86 | |
---|
87 | set llink11 [$ns make-lan "${r(2)} ${leaf11}" 100000.000000kb 0.000000ms ] |
---|
88 | |
---|
89 | set new-link0 [$ns make-lan "${leaf0} ${leaf7}" 100000.000000kb 0.000000ms ] |
---|
90 | |
---|
91 | set new-link1 [$ns make-lan "${leaf4} ${leaf11}" 100000.000000kb 0.000000ms ] |
---|
92 | |
---|
93 | set new-link2 [$ns make-lan "${leaf3} ${leaf8}" 100000.000000kb 0.000000ms ] |
---|
94 | |
---|
95 | $ns rtproto Static |
---|
96 | $ns run |
---|