blob: 1b5163ea14af8c6ffe2b346fe27eb761dcc56a28 [file] [log] [blame]
You Wangdb927a52016-02-26 11:03:28 -08001#!/usr/bin/python
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07002
3"""
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -07004Copyright 2016 Open Networking Foundation ( ONF )
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07005
6Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
7the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
8or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
9
10 TestON is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 2 of the License, or
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070013 ( at your option ) any later version.
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -070014
15 TestON is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with TestON. If not, see <http://www.gnu.org/licenses/>.
22"""
You Wangdb927a52016-02-26 11:03:28 -080023from mininet.topo import Topo
24from mininet.net import Mininet
25from mininet.node import Host, RemoteController
26from mininet.node import Node
27from mininet.node import CPULimitedHost
28from mininet.link import TCLink
29from mininet.cli import CLI
30from mininet.log import setLogLevel
31from mininet.util import dumpNodeConnections
32from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
33
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070034
You Wangdb927a52016-02-26 11:03:28 -080035class dualStackHost( Host ):
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070036
You Wangdb927a52016-02-26 11:03:28 -080037 def config( self, v6Addr='1000::1/64', **params ):
38 r = super( Host, self ).config( **params )
39 intf = self.defaultIntf()
40 self.cmd( 'ip -6 addr add %s dev %s' % ( v6Addr, intf ) )
41 return r
42
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070043
You Wangdb927a52016-02-26 11:03:28 -080044class spineTopo( Topo ):
45
46 def __init__( self, **opts ):
47 "Create a topology."
48
49 # Initialize Topology
50 Topo.__init__( self, **opts )
51
52 # add nodes, Leaf switches
53 s1 = self.addSwitch( 's1' )
54 s2 = self.addSwitch( 's2' )
55 s3 = self.addSwitch( 's3' )
56 s4 = self.addSwitch( 's4' )
57 s5 = self.addSwitch( 's5' )
58 s6 = self.addSwitch( 's6' )
59 s7 = self.addSwitch( 's7' )
60 s8 = self.addSwitch( 's8' )
61 s9 = self.addSwitch( 's9' )
62 s10 = self.addSwitch( 's10' )
63 s11 = self.addSwitch( 's11' )
64 s12 = self.addSwitch( 's12' )
65 s13 = self.addSwitch( 's13' )
66 s14 = self.addSwitch( 's14' )
67
68 # add nodes, Spine switches first...
69 s15 = self.addSwitch( 's15' )
70 s16 = self.addSwitch( 's16' )
71 s17 = self.addSwitch( 's17' )
72 s18 = self.addSwitch( 's18' )
73 s19 = self.addSwitch( 's19' )
74 s20 = self.addSwitch( 's20' )
75 s21 = self.addSwitch( 's21' )
76 s22 = self.addSwitch( 's22' )
77 s23 = self.addSwitch( 's23' )
78 s24 = self.addSwitch( 's24' )
79 s25 = self.addSwitch( 's25' )
80 s26 = self.addSwitch( 's26' )
81 s27 = self.addSwitch( 's27' )
82 s28 = self.addSwitch( 's28' )
83 s29 = self.addSwitch( 's29' )
84 s30 = self.addSwitch( 's30' )
85 s31 = self.addSwitch( 's31' )
86 s32 = self.addSwitch( 's32' )
87 s33 = self.addSwitch( 's33' )
88 s34 = self.addSwitch( 's34' )
89 s35 = self.addSwitch( 's35' )
90 s36 = self.addSwitch( 's36' )
91 s37 = self.addSwitch( 's37' )
92 s38 = self.addSwitch( 's38' )
93 s39 = self.addSwitch( 's39' )
94 s40 = self.addSwitch( 's40' )
95 s41 = self.addSwitch( 's41' )
96 s42 = self.addSwitch( 's42' )
97 s43 = self.addSwitch( 's43' )
98 s44 = self.addSwitch( 's44' )
99 s45 = self.addSwitch( 's45' )
100 s46 = self.addSwitch( 's46' )
101 s47 = self.addSwitch( 's47' )
102 s48 = self.addSwitch( 's48' )
103 s49 = self.addSwitch( 's49' )
104 s50 = self.addSwitch( 's50' )
105 s51 = self.addSwitch( 's51' )
106 s52 = self.addSwitch( 's52' )
107 s53 = self.addSwitch( 's53' )
108 s54 = self.addSwitch( 's54' )
109 s55 = self.addSwitch( 's55' )
110 s56 = self.addSwitch( 's56' )
111 s57 = self.addSwitch( 's57' )
112 s58 = self.addSwitch( 's58' )
113 s59 = self.addSwitch( 's59' )
114 s60 = self.addSwitch( 's60' )
115 s61 = self.addSwitch( 's61' )
116 s62 = self.addSwitch( 's62' )
117 s63 = self.addSwitch( 's63' )
118 s64 = self.addSwitch( 's64' )
119 s65 = self.addSwitch( 's65' )
120 s66 = self.addSwitch( 's66' )
121 s67 = self.addSwitch( 's67' )
122 s68 = self.addSwitch( 's68' )
123 s69 = self.addSwitch( 's69' )
124 s70 = self.addSwitch( 's70' )
125 s71 = self.addSwitch( 's71' )
126 s72 = self.addSwitch( 's72' )
127 s73 = self.addSwitch( 's73' )
128 s74 = self.addSwitch( 's74' )
129 s75 = self.addSwitch( 's75' )
130 s76 = self.addSwitch( 's76' )
131 s77 = self.addSwitch( 's77' )
132 s78 = self.addSwitch( 's78' )
133
You Wangdb927a52016-02-26 11:03:28 -0800134 # ... and now hosts
135 # s1_host = self.addHost( 'h1', ip='10.1.0.1/24', cls=dualStackHost, v6Addr='1000::1/64' )
136 # s2_host = self.addHost( 'h2', ip='10.1.0.2/24', cls=dualStackHost, v6Addr='1000::2/64' )
137 # s3_host = self.addHost( 'h3', ip='10.1.0.3/24', cls=dualStackHost, v6Addr='1000::3/64' )
138 # s4_host = self.addHost( 'h4', ip='10.1.0.4/24', cls=dualStackHost, v6Addr='1000::4/64' )
139 # s5_host = self.addHost( 'h5', ip='10.1.0.5/24', cls=dualStackHost, v6Addr='1000::5/64' )
140 # s6_host = self.addHost( 'h6', ip='10.1.0.6/24', cls=dualStackHost, v6Addr='1000::6/64' )
141 # s7_host = self.addHost( 'h7', ip='10.1.0.7/24', cls=dualStackHost, v6Addr='1000::7/64' )
142 # s8_host = self.addHost( 'h8', ip='10.1.0.8/24', cls=dualStackHost, v6Addr='1000::8/64' )
143 # s9_host = self.addHost( 'h9', ip='10.1.0.9/24', cls=dualStackHost, v6Addr='1000::9/64' )
144 # s10_host = self.addHost( 'h10', ip='10.1.0.10/24', cls=dualStackHost, v6Addr='1000::10/64' )
145 s11_host = self.addHost( 'h11', ip='10.1.0.11/24', cls=dualStackHost, v6Addr='1000::11/64' )
146 s12_host = self.addHost( 'h12', ip='10.1.0.12/24', cls=dualStackHost, v6Addr='1000::12/64' )
147 s13_host = self.addHost( 'h13', ip='10.1.0.13/24', cls=dualStackHost, v6Addr='1000::13/64' )
148 s14_host = self.addHost( 'h14', ip='10.1.0.14/24', cls=dualStackHost, v6Addr='1000::14/64' )
149 s15_host = self.addHost( 'h15', ip='10.1.0.15/24', cls=dualStackHost, v6Addr='1000::15/64' )
150 s16_host = self.addHost( 'h16', ip='10.1.0.16/24', cls=dualStackHost, v6Addr='1000::16/64' )
151 s17_host = self.addHost( 'h17', ip='10.1.0.17/24', cls=dualStackHost, v6Addr='1000::17/64' )
152 s18_host = self.addHost( 'h18', ip='10.1.0.18/24', cls=dualStackHost, v6Addr='1000::18/64' )
153 s19_host = self.addHost( 'h19', ip='10.1.0.19/24', cls=dualStackHost, v6Addr='1000::19/64' )
154 s20_host = self.addHost( 'h20', ip='10.1.0.20/24', cls=dualStackHost, v6Addr='1000::20/64' )
155 s21_host = self.addHost( 'h21', ip='10.1.0.21/24', cls=dualStackHost, v6Addr='1000::21/64' )
156 s22_host = self.addHost( 'h22', ip='10.1.0.22/24', cls=dualStackHost, v6Addr='1000::22/64' )
157 s23_host = self.addHost( 'h23', ip='10.1.0.23/24', cls=dualStackHost, v6Addr='1000::23/64' )
158 s24_host = self.addHost( 'h24', ip='10.1.0.24/24', cls=dualStackHost, v6Addr='1000::24/64' )
159 s25_host = self.addHost( 'h25', ip='10.1.0.25/24', cls=dualStackHost, v6Addr='1000::25/64' )
160 s26_host = self.addHost( 'h26', ip='10.1.0.26/24', cls=dualStackHost, v6Addr='1000::26/64' )
161 s27_host = self.addHost( 'h27', ip='10.1.0.27/24', cls=dualStackHost, v6Addr='1000::27/64' )
162 s28_host = self.addHost( 'h28', ip='10.1.0.28/24', cls=dualStackHost, v6Addr='1000::28/64' )
163 s29_host = self.addHost( 'h29', ip='10.1.0.29/24', cls=dualStackHost, v6Addr='1000::29/64' )
164 s30_host = self.addHost( 'h30', ip='10.1.0.30/24', cls=dualStackHost, v6Addr='1000::30/64' )
165 s31_host = self.addHost( 'h31', ip='10.1.0.31/24', cls=dualStackHost, v6Addr='1000::31/64' )
166 s32_host = self.addHost( 'h32', ip='10.1.0.32/24', cls=dualStackHost, v6Addr='1000::32/64' )
167 s33_host = self.addHost( 'h33', ip='10.1.0.33/24', cls=dualStackHost, v6Addr='1000::33/64' )
168 s34_host = self.addHost( 'h34', ip='10.1.0.34/24', cls=dualStackHost, v6Addr='1000::34/64' )
169 s35_host = self.addHost( 'h35', ip='10.1.0.35/24', cls=dualStackHost, v6Addr='1000::35/64' )
170 s36_host = self.addHost( 'h36', ip='10.1.0.36/24', cls=dualStackHost, v6Addr='1000::36/64' )
171 s37_host = self.addHost( 'h37', ip='10.1.0.37/24', cls=dualStackHost, v6Addr='1000::37/64' )
172 s38_host = self.addHost( 'h38', ip='10.1.0.38/24', cls=dualStackHost, v6Addr='1000::38/64' )
173 s39_host = self.addHost( 'h39', ip='10.1.0.39/24', cls=dualStackHost, v6Addr='1000::39/64' )
174 s40_host = self.addHost( 'h40', ip='10.1.0.40/24', cls=dualStackHost, v6Addr='1000::40/64' )
175 s41_host = self.addHost( 'h41', ip='10.1.0.41/24', cls=dualStackHost, v6Addr='1000::41/64' )
176 s42_host = self.addHost( 'h42', ip='10.1.0.42/24', cls=dualStackHost, v6Addr='1000::42/64' )
177 s43_host = self.addHost( 'h43', ip='10.1.0.43/24', cls=dualStackHost, v6Addr='1000::43/64' )
178 s44_host = self.addHost( 'h44', ip='10.1.0.44/24', cls=dualStackHost, v6Addr='1000::44/64' )
179 s45_host = self.addHost( 'h45', ip='10.1.0.45/24', cls=dualStackHost, v6Addr='1000::45/64' )
180 s46_host = self.addHost( 'h46', ip='10.1.0.46/24', cls=dualStackHost, v6Addr='1000::46/64' )
181 s47_host = self.addHost( 'h47', ip='10.1.0.47/24', cls=dualStackHost, v6Addr='1000::47/64' )
182 s48_host = self.addHost( 'h48', ip='10.1.0.48/24', cls=dualStackHost, v6Addr='1000::48/64' )
183 s49_host = self.addHost( 'h49', ip='10.1.0.49/24', cls=dualStackHost, v6Addr='1000::49/64' )
184 s50_host = self.addHost( 'h50', ip='10.1.0.50/24', cls=dualStackHost, v6Addr='1000::50/64' )
185 s51_host = self.addHost( 'h51', ip='10.1.0.51/24', cls=dualStackHost, v6Addr='1000::51/64' )
186 s52_host = self.addHost( 'h52', ip='10.1.0.52/24', cls=dualStackHost, v6Addr='1000::52/64' )
187 s53_host = self.addHost( 'h53', ip='10.1.0.53/24', cls=dualStackHost, v6Addr='1000::53/64' )
188 s54_host = self.addHost( 'h54', ip='10.1.0.54/24', cls=dualStackHost, v6Addr='1000::54/64' )
189 s55_host = self.addHost( 'h55', ip='10.1.0.55/24', cls=dualStackHost, v6Addr='1000::55/64' )
190 s56_host = self.addHost( 'h56', ip='10.1.0.56/24', cls=dualStackHost, v6Addr='1000::56/64' )
191 s57_host = self.addHost( 'h57', ip='10.1.0.57/24', cls=dualStackHost, v6Addr='1000::57/64' )
192 s58_host = self.addHost( 'h58', ip='10.1.0.58/24', cls=dualStackHost, v6Addr='1000::58/64' )
193 s59_host = self.addHost( 'h59', ip='10.1.0.59/24', cls=dualStackHost, v6Addr='1000::59/64' )
194 s60_host = self.addHost( 'h60', ip='10.1.0.60/24', cls=dualStackHost, v6Addr='1000::60/64' )
195 s61_host = self.addHost( 'h61', ip='10.1.0.61/24', cls=dualStackHost, v6Addr='1000::61/64' )
196 s62_host = self.addHost( 'h62', ip='10.1.0.62/24', cls=dualStackHost, v6Addr='1000::62/64' )
197 s63_host = self.addHost( 'h63', ip='10.1.0.63/24', cls=dualStackHost, v6Addr='1000::63/64' )
198 s64_host = self.addHost( 'h64', ip='10.1.0.64/24', cls=dualStackHost, v6Addr='1000::64/64' )
199 s65_host = self.addHost( 'h65', ip='10.1.0.65/24', cls=dualStackHost, v6Addr='1000::65/64' )
200 s66_host = self.addHost( 'h66', ip='10.1.0.66/24', cls=dualStackHost, v6Addr='1000::66/64' )
201 s67_host = self.addHost( 'h67', ip='10.1.0.67/24', cls=dualStackHost, v6Addr='1000::67/64' )
202 s68_host = self.addHost( 'h68', ip='10.1.0.68/24', cls=dualStackHost, v6Addr='1000::68/64' )
203 s69_host = self.addHost( 'h69', ip='10.1.0.69/24', cls=dualStackHost, v6Addr='1000::69/64' )
204 s70_host = self.addHost( 'h70', ip='10.1.0.70/24', cls=dualStackHost, v6Addr='1000::70/64' )
205 s71_host = self.addHost( 'h71', ip='10.1.0.71/24', cls=dualStackHost, v6Addr='1000::71/64' )
206 s72_host = self.addHost( 'h72', ip='10.1.0.72/24', cls=dualStackHost, v6Addr='1000::72/64' )
207 s73_host = self.addHost( 'h73', ip='10.1.0.73/24', cls=dualStackHost, v6Addr='1000::73/64' )
208 s74_host = self.addHost( 'h74', ip='10.1.0.74/24', cls=dualStackHost, v6Addr='1000::74/64' )
209 s75_host = self.addHost( 'h75', ip='10.1.0.75/24', cls=dualStackHost, v6Addr='1000::75/64' )
210 s76_host = self.addHost( 'h76', ip='10.1.0.76/24', cls=dualStackHost, v6Addr='1000::76/64' )
211 s77_host = self.addHost( 'h77', ip='10.1.0.77/24', cls=dualStackHost, v6Addr='1000::77/64' )
212 s78_host = self.addHost( 'h78', ip='10.1.0.78/24', cls=dualStackHost, v6Addr='1000::78/64' )
213
214 # add edges between switch and corresponding host
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700215 # self.addLink( s1 , s1_host )
216 # self.addLink( s2 , s2_host )
217 # self.addLink( s3 , s3_host )
218 # self.addLink( s4 , s4_host )
219 # self.addLink( s5 , s5_host )
220 # self.addLink( s6 , s6_host )
221 # self.addLink( s7 , s7_host )
222 # self.addLink( s8 , s8_host )
223 # self.addLink( s9 , s9_host )
224 # self.addLink( s10 , s10_host )
225 self.addLink( s11, s11_host )
226 self.addLink( s12, s12_host )
227 self.addLink( s13, s13_host )
228 self.addLink( s14, s14_host )
229 self.addLink( s15, s15_host )
230 self.addLink( s16, s16_host )
231 self.addLink( s17, s17_host )
232 self.addLink( s18, s18_host )
233 self.addLink( s19, s19_host )
234 self.addLink( s20, s20_host )
235 self.addLink( s21, s21_host )
236 self.addLink( s22, s22_host )
237 self.addLink( s23, s23_host )
238 self.addLink( s24, s24_host )
239 self.addLink( s25, s25_host )
240 self.addLink( s26, s26_host )
241 self.addLink( s27, s27_host )
242 self.addLink( s28, s28_host )
243 self.addLink( s29, s29_host )
244 self.addLink( s30, s30_host )
245 self.addLink( s31, s31_host )
246 self.addLink( s32, s32_host )
247 self.addLink( s33, s33_host )
248 self.addLink( s34, s34_host )
249 self.addLink( s35, s35_host )
250 self.addLink( s36, s36_host )
251 self.addLink( s37, s37_host )
252 self.addLink( s38, s38_host )
253 self.addLink( s39, s39_host )
254 self.addLink( s40, s40_host )
255 self.addLink( s41, s41_host )
256 self.addLink( s42, s42_host )
257 self.addLink( s43, s43_host )
258 self.addLink( s44, s44_host )
259 self.addLink( s45, s45_host )
260 self.addLink( s46, s46_host )
261 self.addLink( s47, s47_host )
262 self.addLink( s48, s48_host )
263 self.addLink( s49, s49_host )
264 self.addLink( s50, s50_host )
265 self.addLink( s51, s51_host )
266 self.addLink( s52, s52_host )
267 self.addLink( s53, s53_host )
268 self.addLink( s54, s54_host )
269 self.addLink( s55, s55_host )
270 self.addLink( s56, s56_host )
271 self.addLink( s57, s57_host )
272 self.addLink( s58, s58_host )
273 self.addLink( s59, s59_host )
274 self.addLink( s60, s60_host )
275 self.addLink( s61, s61_host )
276 self.addLink( s62, s62_host )
277 self.addLink( s63, s63_host )
278 self.addLink( s64, s64_host )
279 self.addLink( s65, s65_host )
280 self.addLink( s66, s66_host )
281 self.addLink( s67, s67_host )
282 self.addLink( s68, s68_host )
283 self.addLink( s69, s69_host )
284 self.addLink( s70, s70_host )
285 self.addLink( s71, s71_host )
286 self.addLink( s72, s72_host )
287 self.addLink( s73, s73_host )
288 self.addLink( s74, s74_host )
289 self.addLink( s75, s75_host )
290 self.addLink( s76, s76_host )
291 self.addLink( s77, s77_host )
292 self.addLink( s78, s78_host )
You Wangdb927a52016-02-26 11:03:28 -0800293
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700294 # info( '*** Add Leaf links\n' )
295 self.addLink( s1, s9 )
296 self.addLink( s2, s10 )
297 self.addLink( s3, s9 )
298 self.addLink( s4, s10 )
299 self.addLink( s5, s9 )
300 self.addLink( s6, s10 )
301 self.addLink( s7, s9 )
302 self.addLink( s8, s10 )
303 self.addLink( s9, s11 )
304 self.addLink( s9, s12 )
305 self.addLink( s10, s13 )
306 self.addLink( s10, s14 )
307 self.addLink( s11, s12 )
308 self.addLink( s13, s14 )
You Wangdb927a52016-02-26 11:03:28 -0800309
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700310 # info( '*** Add Spine-1 links\n' )
311 self.addLink( s15, s1 )
312 self.addLink( s15, s2 )
313 self.addLink( s16, s1 )
314 self.addLink( s16, s2 )
315 self.addLink( s17, s1 )
316 self.addLink( s17, s2 )
317 self.addLink( s18, s1 )
318 self.addLink( s18, s2 )
319 self.addLink( s19, s1 )
320 self.addLink( s19, s2 )
321 self.addLink( s20, s1 )
322 self.addLink( s20, s2 )
323 self.addLink( s21, s1 )
324 self.addLink( s21, s2 )
325 self.addLink( s22, s1 )
326 self.addLink( s22, s2 )
327 self.addLink( s23, s1 )
328 self.addLink( s23, s2 )
329 self.addLink( s24, s1 )
330 self.addLink( s24, s2 )
331 self.addLink( s25, s1 )
332 self.addLink( s25, s2 )
333 self.addLink( s26, s1 )
334 self.addLink( s26, s2 )
335 self.addLink( s27, s1 )
336 self.addLink( s27, s2 )
337 self.addLink( s28, s1 )
338 self.addLink( s28, s2 )
339 self.addLink( s29, s1 )
340 self.addLink( s29, s2 )
341 self.addLink( s30, s1 )
342 self.addLink( s30, s2 )
You Wangdb927a52016-02-26 11:03:28 -0800343
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700344 # info( '*** Add Spine-2 links\n' )
345 self.addLink( s31, s3 )
346 self.addLink( s31, s4 )
347 self.addLink( s32, s3 )
348 self.addLink( s32, s4 )
349 self.addLink( s33, s3 )
350 self.addLink( s33, s4 )
351 self.addLink( s34, s3 )
352 self.addLink( s34, s4 )
353 self.addLink( s35, s3 )
354 self.addLink( s35, s4 )
355 self.addLink( s36, s3 )
356 self.addLink( s36, s4 )
357 self.addLink( s37, s3 )
358 self.addLink( s37, s4 )
359 self.addLink( s38, s3 )
360 self.addLink( s38, s4 )
361 self.addLink( s39, s3 )
362 self.addLink( s39, s4 )
363 self.addLink( s40, s3 )
364 self.addLink( s40, s4 )
365 self.addLink( s41, s3 )
366 self.addLink( s41, s4 )
367 self.addLink( s42, s3 )
368 self.addLink( s42, s4 )
369 self.addLink( s43, s3 )
370 self.addLink( s43, s4 )
371 self.addLink( s44, s3 )
372 self.addLink( s44, s4 )
373 self.addLink( s45, s3 )
374 self.addLink( s45, s4 )
375 self.addLink( s46, s3 )
376 self.addLink( s46, s4 )
You Wangdb927a52016-02-26 11:03:28 -0800377
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700378 # info( '*** Add Spine-3 links\n' )
379 self.addLink( s47, s5 )
380 self.addLink( s47, s6 )
381 self.addLink( s48, s5 )
382 self.addLink( s48, s6 )
383 self.addLink( s49, s5 )
384 self.addLink( s49, s6 )
385 self.addLink( s50, s5 )
386 self.addLink( s50, s6 )
387 self.addLink( s51, s5 )
388 self.addLink( s51, s6 )
389 self.addLink( s52, s5 )
390 self.addLink( s52, s6 )
391 self.addLink( s53, s5 )
392 self.addLink( s53, s6 )
393 self.addLink( s54, s5 )
394 self.addLink( s54, s6 )
395 self.addLink( s55, s5 )
396 self.addLink( s55, s6 )
397 self.addLink( s56, s5 )
398 self.addLink( s56, s6 )
399 self.addLink( s57, s5 )
400 self.addLink( s57, s6 )
401 self.addLink( s58, s5 )
402 self.addLink( s58, s6 )
403 self.addLink( s59, s5 )
404 self.addLink( s59, s6 )
405 self.addLink( s60, s5 )
406 self.addLink( s60, s6 )
407 self.addLink( s61, s5 )
408 self.addLink( s61, s6 )
409 self.addLink( s62, s5 )
410 self.addLink( s62, s6 )
You Wangdb927a52016-02-26 11:03:28 -0800411
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700412 # info( '*** Add Spine-4 links\n' )
413 self.addLink( s63, s7 )
414 self.addLink( s63, s8 )
415 self.addLink( s64, s7 )
416 self.addLink( s64, s8 )
417 self.addLink( s65, s7 )
418 self.addLink( s65, s8 )
419 self.addLink( s66, s7 )
420 self.addLink( s66, s8 )
421 self.addLink( s67, s7 )
422 self.addLink( s67, s8 )
423 self.addLink( s68, s7 )
424 self.addLink( s68, s8 )
425 self.addLink( s69, s7 )
426 self.addLink( s69, s8 )
427 self.addLink( s70, s7 )
428 self.addLink( s70, s8 )
429 self.addLink( s71, s7 )
430 self.addLink( s71, s8 )
431 self.addLink( s72, s7 )
432 self.addLink( s72, s8 )
433 self.addLink( s73, s7 )
434 self.addLink( s73, s8 )
435 self.addLink( s74, s7 )
436 self.addLink( s74, s8 )
437 self.addLink( s75, s7 )
438 self.addLink( s75, s8 )
439 self.addLink( s76, s7 )
440 self.addLink( s76, s8 )
441 self.addLink( s77, s7 )
442 self.addLink( s77, s8 )
443 self.addLink( s78, s7 )
444 self.addLink( s78, s8 )
You Wangdb927a52016-02-26 11:03:28 -0800445
446topos = { 'spine': ( lambda: spineTopo() ) }
447
448# HERE THE CODE DEFINITION OF THE TOPOLOGY ENDS
449
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700450
You Wangdb927a52016-02-26 11:03:28 -0800451def setupNetwork():
452 "Create network"
453 topo = spineTopo()
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700454 # if controller_ip == '':
455 # controller_ip = '10.0.2.2';
You Wangdb927a52016-02-26 11:03:28 -0800456 # controller_ip = '127.0.0.1';
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700457 network = Mininet( topo=topo, switch=OVSSwitch, link=TCLink, autoSetMacs=True, controller=None )
You Wangdb927a52016-02-26 11:03:28 -0800458 network.start()
459 CLI( network )
460 network.stop()
461
462if __name__ == '__main__':
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -0700463 setLogLevel( 'info' )
464 # setLogLevel( 'debug' )
You Wangdb927a52016-02-26 11:03:28 -0800465 setupNetwork()