-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyfattree.py
721 lines (687 loc) · 47 KB
/
myfattree.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
#!/usr/bin/python
from mininet.net import Mininet
from mininet.node import Controller, RemoteController, OVSController
from mininet.node import CPULimitedHost, Host, Node
from mininet.node import OVSKernelSwitch, UserSwitch
from mininet.cli import CLI
from mininet.log import setLogLevel, info
from mininet.link import TCLink, Intf
from subprocess import call
def myFattree():
net = Mininet( topo=None,
build=False,
ipBase='10.0.0.0/8')
info(' *** Add switches\n')
''''
一共有四组交换机,一共20个,每组的排序按照从下到上从左到右
''''
s1 = net.addSwitch('s1', cls=OVSKernelSwitch)
s11 = net.addSwitch('s11', cls=OVSKernelSwitch)
s12 = net.addSwitch('s12', cls=OVSKernelSwitch)
s13 = net.addSwitch('s13', cls=OVSKernelSwitch)
s14 = net.addSwitch('s14', cls=OVSKernelSwitch)
s2 = net.addSwitch('s2', cls=OVSKernelSwitch)
s21 = net.addSwitch('s21', cls=OVSKernelSwitch)
s22 = net.addSwitch('s22', cls=OVSKernelSwitch)
s23 = net.addSwitch('s23', cls=OVSKernelSwitch)
s24 = net.addSwitch('s24', cls=OVSKernelSwitch)
s3 = net.addSwitch('s3', cls=OVSKernelSwitch)
s31 = net.addSwitch('s31', cls=OVSKernelSwitch)
s32 = net.addSwitch('s32', cls=OVSKernelSwitch)
s33 = net.addSwitch('s33', cls=OVSKernelSwitch)
s34 = net.addSwitch('s34', cls=OVSKernelSwitch)
s4 = net.addSwitch('s4', cls=OVSKernelSwitch)
s41 = net.addSwitch('s41', cls=OVSKernelSwitch)
s42 = net.addSwitch('s42', cls=OVSKernelSwitch)
s43 = net.addSwitch('s43', cls=OVSKernelSwitch)
s44 = net.addSwitch('s44', cls=OVSKernelSwitch)
info(' *** Add hosts\n')
''''
一共16个主机
''''
h1 = net.addHost('h1', cls=Host, ip='10.0.0.2',defaultRoute=None)
h2 = net.addHost('h2', cls=Host, ip='10.0.0.3',defaultRoute=None)
h3 = net.addHost('h3', cls=Host, ip='10.0.1.2',defaultRoute=None)
h4 = net.addHost('h4', cls=Host, ip='10.0.1.3',defaultRoute=None)
h5 = net.addHost('h5', cls=Host, ip='10.1.0.2',defaultRoute=None)
h6 = net.addHost('h6', cls=Host, ip='10.1.0.3',defaultRoute=None)
h7 = net.addHost('h7', cls=Host, ip='10.1.1.2',defaultRoute=None)
h8 = net.addHost('h8', cls=Host, ip='10.1.1.3',defaultRoute=None)
h9 = net.addHost('h9', cls=Host, ip='10.2.0.2',defaultRoute=None)
h10 = net.addHost('h10', cls=Host, ip='10.2.0.3',defaultRoute=None)
h11 = net.addHost('h11', cls=Host, ip='10.2.1.2',defaultRoute=None)
h12 = net.addHost('h12', cls=Host, ip='10.2.1.3',defaultRoute=None)
h13 = net.addHost('h13', cls=Host, ip='10.3.0.2',defaultRoute=None)
h14 = net.addHost('h14', cls=Host, ip='10.3.0.3',defaultRoute=None)
h15 = net.addHost('h15', cls=Host, ip='10.3.1.2',defaultRoute=None)
h16 = net.addHost('h16', cls=Host, ip='10.3.1.3',defaultRoute=None)
info(' *** Add links\n')
''''
第一层交换机与第二层的连接
''''
net.addLink(s1,s13,1,1)
net.addLink(s1,s23,2,1)
net.addLink(s1,s33,3,1)
net.addLink(s1,s43,4,1)
net.addLink(s2,s13,1,1)
net.addLink(s2,s23)
net.addLink(s2,s33)
net.addLink(s2,s43)
net.addLink(s3,s14)
net.addLink(s3,s24)
net.addLink(s3,s34)
net.addLink(s3,s44)
net.addLink(s4,s14)
net.addLink(s4,s24)
net.addLink(s4,s34)
net.addLink(s4,s44)
''''
第二层之间的连接
''''
net.addLink(s11,s13)
net.addLink(s11,s14)
net.addLink(s12,s13)
net.addLink(s12,s14)
net.addLink(s21,s23)
net.addLink(s21,s24)
net.addLink(s22,s23)
net.addLink(s22,s24)
net.addLink(s31,s33)
net.addLink(s31,s34)
net.addLink(s32,s33)
net.addLink(s32,s34)
net.addLink(s41,s43)
net.addLink(s41,s44)
net.addLink(s42,s43)
net.addLink(s42,s44)
''''
第二层和第三层之间的连接
''''
net.addLink(s11,h1)
net.addLink(s11,h2)
net.addLink(s12,h3)
net.addLink(s12,h4)
net.addLink(s21,h5)
net.addLink(s21,h6)
net.addLink(s22,h7)
net.addLink(s22,h8)
net.addLink(s31,h9)
net.addLink(s31,h10)
net.addLink(s32,h11)
net.addLink(s32,h12)
net.addLink(s41,h13)
net.addLink(s41,h14)
net.addLink(s42,h15)
net.addLink(s42,h16)
info(' *** Starting network\n')
net.build()
#s1
s1.cmd(r'ovs-ofctl add-flow s1 "arp,nw_dst=10.0.0.0/16,actions=output:1"')
s1.cmd(r'ovs-ofctl add-flow s1 "arp,nw_dst=10.1.0.0/16,actions=output:2"')
s1.cmd(r'ovs-ofctl add-flow s1 "arp,nw_dst=10.2.0.0/16,actions=output:3"')
s1.cmd(r'ovs-ofctl add-flow s1 "arp,nw_dst=10.3.0.0/16,actions=output:4"')
s1.cmd(r'ovs-ofctl add-flow s1 "icmp,nw_dst=10.0.0.0/16,actions=output:1"')
s1.cmd(r'ovs-ofctl add-flow s1 "icmp,nw_dst=10.1.0.0/16,actions=output:2"')
s1.cmd(r'ovs-ofctl add-flow s1 "icmp,nw_dst=10.2.0.0/16,actions=output:3"')
s1.cmd(r'ovs-ofctl add-flow s1 "icmp,nw_dst=10.3.0.0/16,actions=output:4"')
#s2
s2.cmd(r'ovs-ofctl add-flow s2 "arp,nw_dst=10.0.0.0/16,actions=output:1"')
s2.cmd(r'ovs-ofctl add-flow s2 "arp,nw_dst=10.1.0.0/16,actions=output:2"')
s2.cmd(r'ovs-ofctl add-flow s2 "arp,nw_dst=10.2.0.0/16,actions=output:3"')
s2.cmd(r'ovs-ofctl add-flow s2 "arp,nw_dst=10.3.0.0/16,actions=output:4"')
s2.cmd(r'ovs-ofctl add-flow s2 "icmp,nw_dst=10.0.0.0/16,actions=output:1"')
s2.cmd(r'ovs-ofctl add-flow s2 "icmp,nw_dst=10.1.0.0/16,actions=output:2"')
s2.cmd(r'ovs-ofctl add-flow s2 "icmp,nw_dst=10.2.0.0/16,actions=output:3"')
s2.cmd(r'ovs-ofctl add-flow s2 "icmp,nw_dst=10.3.0.0/16,actions=output:4"')
#s3
s3.cmd(r'ovs-ofctl add-flow s3 "arp,nw_dst=10.0.0.0/16,actions=output:1"')
s3.cmd(r'ovs-ofctl add-flow s3 "arp,nw_dst=10.1.0.0/16,actions=output:2"')
s3.cmd(r'ovs-ofctl add-flow s3 "arp,nw_dst=10.2.0.0/16,actions=output:3"')
s3.cmd(r'ovs-ofctl add-flow s3 "arp,nw_dst=10.3.0.0/16,actions=output:4"')
s3.cmd(r'ovs-ofctl add-flow s3 "icmp,nw_dst=10.0.0.0/16,actions=output:1"')
s3.cmd(r'ovs-ofctl add-flow s3 "icmp,nw_dst=10.1.0.0/16,actions=output:2"')
s3.cmd(r'ovs-ofctl add-flow s3 "icmp,nw_dst=10.2.0.0/16,actions=output:3"')
s3.cmd(r'ovs-ofctl add-flow s3 "icmp,nw_dst=10.3.0.0/16,actions=output:4"')
#s4
s4.cmd(r'ovs-ofctl add-flow s4 "arp,nw_dst=10.0.0.0/16,actions=output:1"')
s4.cmd(r'ovs-ofctl add-flow s4 "arp,nw_dst=10.1.0.0/16,actions=output:2"')
s4.cmd(r'ovs-ofctl add-flow s4 "arp,nw_dst=10.2.0.0/16,actions=output:3"')
s4.cmd(r'ovs-ofctl add-flow s4 "arp,nw_dst=10.3.0.0/16,actions=output:4"')
s4.cmd(r'ovs-ofctl add-flow s4 "icmp,nw_dst=10.0.0.0/16,actions=output:1"')
s4.cmd(r'ovs-ofctl add-flow s4 "icmp,nw_dst=10.1.0.0/16,actions=output:2"')
s4.cmd(r'ovs-ofctl add-flow s4 "icmp,nw_dst=10.2.0.0/16,actions=output:3"')
s4.cmd(r'ovs-ofctl add-flow s4 "icmp,nw_dst=10.3.0.0/16,actions=output:4"')
#s11
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.0.0.2,actions=output:3"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.0.0.3,actions=output:4"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.0.1.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.0.1.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.1.0.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.1.0.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.1.1.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.1.1.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.2.0.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.2.0.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.2.1.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.2.1.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.3.0.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.3.0.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.3.1.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "arp,nw_dst=10.3.1.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.0.0.2,actions=output:3"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.0.0.3,actions=output:4"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.0.1.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.0.1.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.1.0.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.1.0.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.1.1.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.1.1.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.2.0.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.2.0.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.2.1.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.2.1.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.3.0.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.3.0.3,actions=output:2"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.3.1.2,actions=output:1"')
s11.cmd(r'ovs-ofctl add-flow s11 "icmp,nw_dst=10.3.1.3,actions=output:2"')
#s12
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.0.0.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.0.0.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.0.1.2,actions=output:3"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.0.1.3,actions=output:4"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.1.0.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.1.0.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.1.1.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.1.1.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.2.0.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.2.0.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.2.1.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.2.1.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.3.0.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.3.0.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.3.1.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "arp,nw_dst=10.3.1.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.0.0.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.0.0.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.0.1.2,actions=output:3"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.0.1.3,actions=output:4"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.1.0.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.1.0.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.1.1.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.1.1.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.2.0.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.2.0.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.2.1.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.2.1.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.3.0.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.3.0.3,actions=output:1"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.3.1.2,actions=output:2"')
s12.cmd(r'ovs-ofctl add-flow s12 "icmp,nw_dst=10.3.1.3,actions=output:1"')
#s13
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.0.0.2,actions=output:3"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.0.0.3,actions=output:3"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.0.1.2,actions=output:4"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.0.1.3,actions=output:4"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.1.0.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.1.0.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.1.1.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.1.1.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.2.0.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.2.0.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.2.1.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.2.1.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.3.0.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.3.0.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.3.1.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "arp,nw_dst=10.3.1.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.0.0.2,actions=output:3"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.0.0.3,actions=output:3"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.0.1.2,actions=output:4"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.0.1.3,actions=output:4"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.1.0.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.1.0.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.1.1.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.1.1.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.2.0.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.2.0.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.2.1.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.2.1.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.3.0.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.3.0.3,actions=output:2"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.3.1.2,actions=output:1"')
s13.cmd(r'ovs-ofctl add-flow s13 "icmp,nw_dst=10.3.1.3,actions=output:2"')
#s14
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.0.0.2,actions=output:3"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.0.0.3,actions=output:3"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.0.1.2,actions=output:4"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.0.1.3,actions=output:4"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.1.0.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.1.0.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.1.1.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.1.1.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.2.0.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.2.0.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.2.1.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.2.1.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.3.0.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.3.0.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.3.1.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "arp,nw_dst=10.3.1.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.0.0.2,actions=output:3"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.0.0.3,actions=output:3"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.0.1.2,actions=output:4"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.0.1.3,actions=output:4"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.1.0.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.1.0.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.1.1.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.1.1.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.2.0.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.2.0.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.2.1.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.2.1.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.3.0.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.3.0.3,actions=output:1"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.3.1.2,actions=output:2"')
s14.cmd(r'ovs-ofctl add-flow s14 "icmp,nw_dst=10.3.1.3,actions=output:1"')
#s21
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.0.0.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.0.0.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.0.1.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.0.1.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.1.0.2,actions=output:3"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.1.0.3,actions=output:4"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.1.1.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.1.1.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.2.0.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.2.0.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.2.1.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.2.1.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.3.0.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.3.0.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.3.1.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "arp,nw_dst=10.3.1.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.0.0.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.0.0.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.0.1.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.0.1.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.1.0.2,actions=output:3"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.1.0.3,actions=output:4"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.1.1.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.1.1.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.2.0.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.2.0.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.2.1.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.2.1.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.3.0.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.3.0.3,actions=output:2"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.3.1.2,actions=output:1"')
s21.cmd(r'ovs-ofctl add-flow s21 "icmp,nw_dst=10.3.1.3,actions=output:2"')
#s22
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.0.0.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.0.0.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.0.1.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.0.1.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.1.0.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.1.0.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.1.1.2,actions=output:3"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.1.1.3,actions=output:4"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.2.0.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.2.0.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.2.1.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.2.1.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.3.0.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.3.0.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.3.1.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "arp,nw_dst=10.3.1.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.0.0.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.0.0.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.0.1.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.0.1.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.1.0.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.1.0.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.1.1.2,actions=output:3"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.1.1.3,actions=output:4"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.2.0.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.2.0.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.2.1.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.2.1.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.3.0.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.3.0.3,actions=output:1"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.3.1.2,actions=output:2"')
s22.cmd(r'ovs-ofctl add-flow s22 "icmp,nw_dst=10.3.1.3,actions=output:1"')
#s23
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.0.0.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.0.0.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.0.1.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.0.1.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.1.0.2,actions=output:3"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.1.0.3,actions=output:3"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.1.1.2,actions=output:4"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.1.1.3,actions=output:4"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.2.0.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.2.0.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.2.1.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.2.1.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.3.0.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.3.0.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.3.1.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "arp,nw_dst=10.3.1.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.0.0.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.0.0.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.0.1.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.0.1.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.1.0.2,actions=output:3"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.1.0.3,actions=output:3"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.1.1.2,actions=output:4"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.1.1.3,actions=output:4"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.2.0.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.2.0.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.2.1.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.2.1.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.3.0.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.3.0.3,actions=output:2"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.3.1.2,actions=output:1"')
s23.cmd(r'ovs-ofctl add-flow s23 "icmp,nw_dst=10.3.1.3,actions=output:2"')
#s24
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.0.0.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.0.0.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.0.1.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.0.1.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.1.0.2,actions=output:3"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.1.0.3,actions=output:3"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.1.1.2,actions=output:4"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.1.1.3,actions=output:4"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.2.0.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.2.0.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.2.1.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.2.1.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.3.0.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.3.0.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.3.1.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "arp,nw_dst=10.3.1.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.0.0.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.0.0.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.0.1.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.0.1.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.1.0.2,actions=output:3"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.1.0.3,actions=output:3"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.1.1.2,actions=output:4"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.1.1.3,actions=output:4"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.2.0.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.2.0.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.2.1.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.2.1.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.3.0.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.3.0.3,actions=output:1"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.3.1.2,actions=output:2"')
s24.cmd(r'ovs-ofctl add-flow s24 "icmp,nw_dst=10.3.1.3,actions=output:1"')
#s31
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.0.0.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.0.0.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.0.1.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.0.1.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.1.0.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.1.0.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.1.1.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.1.1.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.2.0.2,actions=output:3"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.2.0.3,actions=output:4"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.2.1.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.2.1.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.3.0.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.3.0.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.3.1.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "arp,nw_dst=10.3.1.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.0.0.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.0.0.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.0.1.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.0.1.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.1.0.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.1.0.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.1.1.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.1.1.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.2.0.2,actions=output:3"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.2.0.3,actions=output:4"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.2.1.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.2.1.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.3.0.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.3.0.3,actions=output:2"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.3.1.2,actions=output:1"')
s31.cmd(r'ovs-ofctl add-flow s31 "icmp,nw_dst=10.3.1.3,actions=output:2"')
#s32
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.0.0.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.0.0.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.0.1.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.0.1.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.1.0.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.1.0.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.1.1.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.1.1.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.2.0.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.2.0.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.2.1.2,actions=output:3"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.2.1.3,actions=output:4"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.3.0.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.3.0.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.3.1.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "arp,nw_dst=10.3.1.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.0.0.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.0.0.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.0.1.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.0.1.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.1.0.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.1.0.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.1.1.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.1.1.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.2.0.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.2.0.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.2.1.2,actions=output:3"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.2.1.3,actions=output:4"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.3.0.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.3.0.3,actions=output:1"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.3.1.2,actions=output:2"')
s32.cmd(r'ovs-ofctl add-flow s32 "icmp,nw_dst=10.3.1.3,actions=output:1"')
#s33
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.0.0.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.0.0.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.0.1.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.0.1.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.1.0.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.1.0.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.1.1.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.1.1.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.2.0.2,actions=output:3"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.2.0.3,actions=output:3"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.2.1.2,actions=output:4"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.2.1.3,actions=output:4"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.3.0.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.3.0.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.3.1.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "arp,nw_dst=10.3.1.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.0.0.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.0.0.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.0.1.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.0.1.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.1.0.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.1.0.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.1.1.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.1.1.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.2.0.2,actions=output:3"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.2.0.3,actions=output:3"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.2.1.2,actions=output:4"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.2.1.3,actions=output:4"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.3.0.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.3.0.3,actions=output:2"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.3.1.2,actions=output:1"')
s33.cmd(r'ovs-ofctl add-flow s33 "icmp,nw_dst=10.3.1.3,actions=output:2"')
#s34
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.0.0.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.0.0.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.0.1.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.0.1.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.1.0.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.1.0.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.1.1.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.1.1.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.2.0.2,actions=output:3"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.2.0.3,actions=output:3"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.2.1.2,actions=output:4"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.2.1.3,actions=output:4"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.3.0.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.3.0.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.3.1.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "arp,nw_dst=10.3.1.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.0.0.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.0.0.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.0.1.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.0.1.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.1.0.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.1.0.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.1.1.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.1.1.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.2.0.2,actions=output:3"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.2.0.3,actions=output:3"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.2.1.2,actions=output:4"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.2.1.3,actions=output:4"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.3.0.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.3.0.3,actions=output:1"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.3.1.2,actions=output:2"')
s34.cmd(r'ovs-ofctl add-flow s34 "icmp,nw_dst=10.3.1.3,actions=output:1"')
#s41
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.0.0.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.0.0.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.0.1.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.0.1.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.1.0.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.1.0.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.1.1.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.1.1.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.2.0.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.2.0.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.2.1.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.2.1.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.3.0.2,actions=output:3"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.3.0.3,actions=output:4"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.3.1.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "arp,nw_dst=10.3.1.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.0.0.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.0.0.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.0.1.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.0.1.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.1.0.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.1.0.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.1.1.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.1.1.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.2.0.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.2.0.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.2.1.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.2.1.3,actions=output:2"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.3.0.2,actions=output:3"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.3.0.3,actions=output:4"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.3.1.2,actions=output:1"')
s41.cmd(r'ovs-ofctl add-flow s41 "icmp,nw_dst=10.3.1.3,actions=output:2"')
#s42
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.0.0.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.0.0.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.0.1.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.0.1.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.1.0.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.1.0.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.1.1.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.1.1.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.2.0.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.2.0.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.2.1.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.2.1.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.3.0.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.3.0.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.3.1.2,actions=output:3"')
s42.cmd(r'ovs-ofctl add-flow s42 "arp,nw_dst=10.3.1.3,actions=output:4"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.0.0.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.0.0.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.0.1.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.0.1.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.1.0.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.1.0.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.1.1.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.1.1.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.2.0.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.2.0.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.2.1.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.2.1.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.3.0.2,actions=output:2"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.3.0.3,actions=output:1"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.3.1.2,actions=output:3"')
s42.cmd(r'ovs-ofctl add-flow s42 "icmp,nw_dst=10.3.1.3,actions=output:4"')
#s43
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.0.0.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.0.0.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.0.1.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.0.1.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.1.0.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.1.0.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.1.1.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.1.1.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.2.0.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.2.0.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.2.1.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.2.1.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.3.0.2,actions=output:3"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.3.0.3,actions=output:3"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.3.1.2,actions=output:4"')
s43.cmd(r'ovs-ofctl add-flow s43 "arp,nw_dst=10.3.1.3,actions=output:4"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.0.0.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.0.0.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.0.1.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.0.1.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.1.0.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.1.0.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.1.1.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.1.1.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.2.0.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.2.0.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.2.1.2,actions=output:1"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.2.1.3,actions=output:2"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.3.0.2,actions=output:3"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.3.0.3,actions=output:3"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.3.1.2,actions=output:4"')
s43.cmd(r'ovs-ofctl add-flow s43 "icmp,nw_dst=10.3.1.3,actions=output:4"')
#s44
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.0.0.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.0.0.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.0.1.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.0.1.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.1.0.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.1.0.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.1.1.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.1.1.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.2.0.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.2.0.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.2.1.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.2.1.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.3.0.2,actions=output:3"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.3.0.3,actions=output:3"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.3.1.2,actions=output:4"')
s44.cmd(r'ovs-ofctl add-flow s44 "arp,nw_dst=10.3.1.3,actions=output:4"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.0.0.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.0.0.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.0.1.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.0.1.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.1.0.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.1.0.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.1.1.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.1.1.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.2.0.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.2.0.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.2.1.2,actions=output:2"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.2.1.3,actions=output:1"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.3.0.2,actions=output:3"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.3.0.3,actions=output:3"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.3.1.2,actions=output:4"')
s44.cmd(r'ovs-ofctl add-flow s44 "icmp,nw_dst=10.3.1.3,actions=output:4"')
info(' *** Post configure switches and hosts\n')
CLI(net)
net.stop()
if __name__=='__main__':
setLogLevel('info')
myFattree()