Andrea Campanella
Committed by Gerrit Code Review

Adding GEANT european topology

Change-Id: Ie30a6145f01e141e8af88116c8fa193a0308f8c3
1 +<!--
2 + ~ Copyright 2016-present Open Networking Laboratory
3 + ~
4 + ~ Licensed under the Apache License, Version 2.0 (the "License");
5 + ~ you may not use this file except in compliance with the License.
6 + ~ You may obtain a copy of the License at
7 + ~
8 + ~ http://www.apache.org/licenses/LICENSE-2.0
9 + ~
10 + ~ Unless required by applicable law or agreed to in writing, software
11 + ~ distributed under the License is distributed on an "AS IS" BASIS,
12 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + ~ See the License for the specific language governing permissions and
14 + ~ limitations under the License.
15 + -->
16 +<scenario name="net-setup-geant" description="Network setup steps">
17 + <!-- TODO: parametrize this via recipes -->
18 + <group name="Net-Setup">
19 + <step name="Push-Topos" exec="onos-push-topos ${OCN}"/>
20 +
21 + <step name="Stop-Mininet-If-Needed" env="~" exec="onos-mininet stop"/>
22 + <step name="Wipe-Out-Data-Before" exec="onos-wipe-out" requires="^"/>
23 +
24 + <step name="Initial-Summary-Check" requires="~Wipe-Out-Data-Before"
25 + exec="onos-check-summary ${OC1} [0-9]* 0 0 0"/>
26 +
27 + <step name="Config-Topo" requires="~Initial-Summary-Check"
28 + exec="onos-netcfg ${OC1} ${ONOS_ROOT}/tools/test/topos/geantmpls-cfg.json"/>
29 +
30 + <step name="Start-Mininet"
31 + requires="Install-Apps,Config-Topo,Push-Topos,Stop-Mininet-If-Needed"
32 + exec="onos-mininet start topos/topo geantmpls.py ${ONOS_INSTANCES}"/>
33 +
34 + <step name="Wait-For-Mininet" requires="Start-Mininet"
35 + exec="onos-mininet wait 10"/>
36 +
37 + <step name="ARP-Hosts" requires="~Wait-For-Mininet"
38 + exec="onos-mininet sendAndExpect gratuitousArp --expect ."/>
39 +
40 + <step name="Check-Summary" requires="ARP-Hosts"
41 + exec="onos-check-summary ${OC1} [0-9]* 25 140 25"/>
42 +
43 + <step name="Balance-Masters" requires="~Check-Summary" if="${OC2}"
44 + exec="onos ${OC1} balance-masters"/>
45 +
46 + <step name="Check-Flows" requires="~Balance-Masters,~Check-Summary" delay="5"
47 + exec="onos-check-flows ${OC1}"/>
48 + </group>
49 +</scenario>
1 +{
2 + "devices": {
3 + "of:0000000000000001": { "basic": { "name": "ATH", "latitude": 37.9841493, "longitude": 23.7279843 }},
4 + "of:0000000000000002": { "basic": { "name": "LIS", "latitude": 38.7077926, "longitude": -9.1365069 }},
5 + "of:0000000000000003": { "basic": { "name": "LON", "latitude": 51.5073219, "longitude": -0.1276473 }},
6 + "of:0000000000000004": { "basic": { "name": "BRU", "latitude": 50.8465565, "longitude": 4.351697 }},
7 + "of:0000000000000005": { "basic": { "name": "PAR", "latitude": 48.8566101, "longitude": 2.3514992 }},
8 + "of:0000000000000006": { "basic": { "name": "DUB", "latitude": 53.3497645, "longitude": -8.2602731 }},
9 + "of:0000000000000007": { "basic": { "name": "MAD", "latitude": 40.4167047, "longitude": -3.7035824 }},
10 + "of:0000000000000008": { "basic": { "name": "GEN", "latitude": 46.2017559, "longitude": 6.1466014 }},
11 + "of:0000000000000009": { "basic": { "name": "MIL", "latitude": 45.4667971, "longitude": 9.1904984 }},
12 + "of:000000000000000a": { "basic": { "name": "SOF", "latitude": 42.6977211, "longitude": 23.3225964 }},
13 + "of:000000000000000b": { "basic": { "name": "BUC", "latitude": 44.4361414, "longitude": 26.1027443 }},
14 + "of:000000000000000c": { "basic": { "name": "VIE", "latitude": 48.2083537, "longitude": 15.3725042 }},
15 + "of:000000000000000d": { "basic": { "name": "FRA", "latitude": 50.1106529, "longitude": 8.6820934 }},
16 + "of:000000000000000e": { "basic": { "name": "COP", "latitude": 55.6867243, "longitude": 9.5700724 }},
17 + "of:000000000000000f": { "basic": { "name": "TLN", "latitude": 59.4372155, "longitude": 24.7453688 }},
18 + "of:0000000000000010": { "basic": { "name": "RIG", "latitude": 56.9493977, "longitude": 24.1051846 }},
19 + "of:0000000000000011": { "basic": { "name": "KAU", "latitude": 54.8981061, "longitude": 23.9117515 }},
20 + "of:0000000000000012": { "basic": { "name": "POZ", "latitude": 52.4082663, "longitude": 16.9335199 }},
21 + "of:0000000000000013": { "basic": { "name": "PRA", "latitude": 50.0874654, "longitude": 14.4212503 }},
22 + "of:0000000000000014": { "basic": { "name": "BRA", "latitude": 48.1359085, "longitude": 18.1597440625 }},
23 + "of:0000000000000015": { "basic": { "name": "ZAG", "latitude": 45.8131545, "longitude": 15.9770298 }},
24 + "of:0000000000000016": { "basic": { "name": "LJU", "latitude": 46.049865, "longitude": 14.5068921 }},
25 + "of:0000000000000017": { "basic": { "name": "BUD", "latitude": 47.4983815, "longitude": 19.0404707 }},
26 + "of:0000000000000018": { "basic": { "name": "MLT", "latitude": 35.8987546, "longitude": 14.5134889 }},
27 + "of:0000000000000019": { "basic": { "name": "LUX", "latitude": 49.8158683, "longitude": 6.1296751 }},
28 + "of:0000000000000020": { "basic": { "name": "MAR", "latitude": 43.2961743, "longitude": 5.3699525 }},
29 + "of:0000000000000021": { "basic": { "name": "FIN", "latitude": 50.6996415, "longitude": 10.6301627 }},
30 + "of:0000000000000022": { "basic": { "name": "BDE", "latitude": 50.8285252, "longitude": -4.546936 }},
31 + "of:000000000000001a": { "basic": { "name": "MAR", "latitude": 43.2961743, "longitude": 5.3699525 }},
32 + "of:000000000000001b": { "basic": { "name": "HAM", "latitude": 53.5503414, "longitude": 10.000654 }},
33 + "of:000000000000001c": { "basic": { "name": "AMS", "latitude": 52.374436, "longitude": 4.8979956033677 }}
34 + },
35 + "hosts": {
36 + "00:00:00:00:00:01/-1": { "basic": { "location": "of:0000000000000001/1", "ips": [ "10.0.0.1" ], "name": "ATH", "latitude": 34.9841493, "longitude": 24.7279843 }},
37 + "00:00:00:00:00:02/-1": { "basic": { "location": "of:0000000000000002/1", "ips": [ "10.0.0.2" ], "name": "LIS", "latitude": 37.7077926, "longitude": -7.1365069 }},
38 + "00:00:00:00:00:03/-1": { "basic": { "location": "of:0000000000000003/1", "ips": [ "10.0.0.3" ], "name": "LON", "latitude": 53.5073219, "longitude": -1.1276473 }},
39 + "00:00:00:00:00:04/-1": { "basic": { "location": "of:0000000000000004/1", "ips": [ "10.0.0.4" ], "name": "BRU", "latitude": 49.0465565, "longitude": 4.351697 }},
40 + "00:00:00:00:00:05/-1": { "basic": { "location": "of:0000000000000005/1", "ips": [ "10.0.0.5" ], "name": "PAR", "latitude": 46.8566101, "longitude": 2.3514992 }},
41 + "00:00:00:00:00:06/-1": { "basic": { "location": "of:0000000000000006/1", "ips": [ "10.0.0.6" ], "name": "DUB", "latitude": 54.3497645, "longitude": -8.2602731 }},
42 + "00:00:00:00:00:07/-1": { "basic": { "location": "of:0000000000000007/1", "ips": [ "10.0.0.7" ], "name": "MAD", "latitude": 37.4167047, "longitude": -3.7035824 }},
43 + "00:00:00:00:00:08/-1": { "basic": { "location": "of:0000000000000008/1", "ips": [ "10.0.0.8" ], "name": "GEN", "latitude": 45.0017559, "longitude": 4.1466014 }},
44 + "00:00:00:00:00:09/-1": { "basic": { "location": "of:0000000000000009/1", "ips": [ "10.0.0.9" ], "name": "MIL", "latitude": 45.4667971, "longitude": 6.6904984 }},
45 + "00:00:00:00:00:0a/-1": { "basic": { "location": "of:000000000000000a/1", "ips": [ "10.0.0.10" ], "name": "SOF", "latitude": 42.6977211, "longitude": 27.9225964 }},
46 + "00:00:00:00:00:0b/-1": { "basic": { "location": "of:000000000000000b/1", "ips": [ "10.0.0.11" ], "name": "BUC", "latitude": 47.4361414, "longitude": 26.1027443 }},
47 + "00:00:00:00:00:0c/-1": { "basic": { "location": "of:000000000000000c/1", "ips": [ "10.0.0.12" ], "name": "VIE", "latitude": 48.2083537, "longitude": 13.3725042 }},
48 + "00:00:00:00:00:0d/-1": { "basic": { "location": "of:000000000000000d/1", "ips": [ "10.0.0.13" ], "name": "FRA", "latitude": 48.1106529, "longitude": 9.2820934 }},
49 + "00:00:00:00:00:0e/-1": { "basic": { "location": "of:000000000000000e/1", "ips": [ "10.0.0.14" ], "name": "COP", "latitude": 57.6867243, "longitude": 10.0700724 }},
50 + "00:00:00:00:00:0f/-1": { "basic": { "location": "of:000000000000000f/1", "ips": [ "10.0.0.15" ], "name": "TLN", "latitude": 59.4372155, "longitude": 26.7453688 }},
51 + "00:00:00:00:00:10/-1": { "basic": { "location": "of:0000000000000010/1", "ips": [ "10.0.0.16" ], "name": "RIG", "latitude": 56.9493977, "longitude": 26.1051846 }},
52 + "00:00:00:00:00:11/-1": { "basic": { "location": "of:0000000000000011/1", "ips": [ "10.0.0.17" ], "name": "KAU", "latitude": 52.8981061, "longitude": 24.9117515 }},
53 + "00:00:00:00:00:12/-1": { "basic": { "location": "of:0000000000000012/1", "ips": [ "10.0.0.18" ], "name": "POZ", "latitude": 50.4082663, "longitude": 19.3335199 }},
54 + "00:00:00:00:00:13/-1": { "basic": { "location": "of:0000000000000013/1", "ips": [ "10.0.0.19" ], "name": "PRA", "latitude": 50.0874654, "longitude": 16.4212503 }},
55 + "00:00:00:00:00:14/-1": { "basic": { "location": "of:0000000000000014/1", "ips": [ "10.0.0.20" ], "name": "BRA", "latitude": 48.8359085, "longitude": 19.1597440625 }},
56 + "00:00:00:00:00:15/-1": { "basic": { "location": "of:0000000000000015/1", "ips": [ "10.0.0.21" ], "name": "ZAG", "latitude": 43.2131545, "longitude": 16.4770298 }},
57 + "00:00:00:00:00:16/-1": { "basic": { "location": "of:0000000000000016/1", "ips": [ "10.0.0.22" ], "name": "LJU", "latitude": 46.049865, "longitude": 13.2068921 }},
58 + "00:00:00:00:00:17/-1": { "basic": { "location": "of:0000000000000017/1", "ips": [ "10.0.0.23" ], "name": "BUD", "latitude": 47.8983815, "longitude": 20.2404707 }},
59 + "00:00:00:00:00:18/-1": { "basic": { "location": "of:0000000000000018/1", "ips": [ "10.0.0.24" ], "name": "MLT", "latitude": 32.8987546, "longitude": 14.5134889 }},
60 + "00:00:00:00:00:19/-1": { "basic": { "location": "of:0000000000000019/1", "ips": [ "10.0.0.25" ], "name": "LUX", "latitude": 48.8158683, "longitude": 6.5296751 }},
61 + "00:00:00:00:00:20/-1": { "basic": { "location": "of:0000000000000020/1", "ips": [ "10.0.0.26" ], "name": "MAR", "latitude": 43.2961743, "longitude": 5.3699525 }},
62 + "00:00:00:00:00:22/-1": { "basic": { "location": "of:0000000000000022/1", "ips": [ "10.0.0.27" ], "name": "BDE", "latitude": 50.8285252, "longitude": -4.546936 }},
63 + "00:00:00:00:00:1a/-1": { "basic": { "location": "of:000000000000001a/1", "ips": [ "10.0.0.28" ], "name": "MAR", "latitude": 43.374436, "longitude": 3.3699525 }},
64 + "00:00:00:00:00:1b/-1": { "basic": { "location": "of:000000000000001b/1", "ips": [ "10.0.0.27" ], "name": "HAM", "latitude": 52.6996415, "longitude": 11.6301627 }},
65 + "00:00:00:00:00:1c/-1": { "basic": { "location": "of:000000000000001c/1", "ips": [ "10.0.0.29" ], "name": "AMS", "latitude": 51.374436, "longitude": 7.3979956033677 }}
66 + }
67 +
68 +}
69 +
70 +
1 +#!/usr/bin/env python
2 +
3 +"""
4 +"""
5 +from mininet.topo import Topo
6 +from mininet.net import Mininet
7 +from mininet.node import RemoteController
8 +from mininet.node import Node
9 +from mininet.node import CPULimitedHost
10 +from mininet.link import TCLink
11 +from mininet.cli import CLI
12 +from mininet.log import setLogLevel
13 +from mininet.util import dumpNodeConnections
14 +
15 +class GeantMplsTopo( Topo ):
16 + "Internet Topology Zoo Specimen."
17 +
18 + def __init__( self ):
19 + "Create a topology."
20 +
21 + # Initialize Topology
22 + Topo.__init__( self )
23 +
24 + # add nodes, switches first...
25 + ATH = self.addSwitch( 's1' )
26 + LIS = self.addSwitch( 's2', protocols='OpenFlow13' )
27 + LON = self.addSwitch( 's3' )
28 + BRU = self.addSwitch( 's4' )
29 + PAR = self.addSwitch( 's5' )
30 + DUB = self.addSwitch( 's6' )
31 + MAD = self.addSwitch( 's7' )
32 + GEN = self.addSwitch( 's8' )
33 + MIL = self.addSwitch( 's9', protocols='OpenFlow13' )
34 + SOF = self.addSwitch( 's10' )
35 + BUC = self.addSwitch( 's11' )
36 + VIE = self.addSwitch( 's12' )
37 + FRA = self.addSwitch( 's13' )
38 + COP = self.addSwitch( 's14' )
39 + TLN = self.addSwitch( 's15' )
40 + RIG = self.addSwitch( 's16' )
41 + KAU = self.addSwitch( 's17' )
42 + POZ = self.addSwitch( 's18' )
43 + PRA = self.addSwitch( 's19' )
44 + BRA = self.addSwitch( 's20' )
45 + ZAG = self.addSwitch( 's21' )
46 + LJU = self.addSwitch( 's22', protocols='OpenFlow13' )
47 + BUD = self.addSwitch( 's23' )
48 + MLT = self.addSwitch( 's24' )
49 + LUX = self.addSwitch( 's25' )
50 + MAR = self.addSwitch( 's26' )
51 + HAM = self.addSwitch( 's27' )
52 + AMS = self.addSwitch( 's28' )
53 +
54 +
55 + # ... and now hosts
56 + ATH_host = self.addHost( 'h1' )
57 + LIS_host = self.addHost( 'h2' )
58 + LON_host = self.addHost( 'h3' )
59 + BRU_host = self.addHost( 'h4' )
60 + PAR_host = self.addHost( 'h5' )
61 + DUB_host = self.addHost( 'h6' )
62 + MAD_host = self.addHost( 'h7' )
63 + GEN_host = self.addHost( 'h8' )
64 + MIL_host = self.addHost( 'h9' )
65 + SOF_host = self.addHost( 'h10' )
66 + BUC_host = self.addHost( 'h11' )
67 + VIE_host = self.addHost( 'h12' )
68 + FRA_host = self.addHost( 'h13' )
69 + COP_host = self.addHost( 'h14' )
70 + TLN_host = self.addHost( 'h15' )
71 + RIG_host = self.addHost( 'h16' )
72 + KAU_host = self.addHost( 'h17' )
73 + POZ_host = self.addHost( 'h18' )
74 + PRA_host = self.addHost( 'h19' )
75 + BRA_host = self.addHost( 'h20' )
76 + ZAG_host = self.addHost( 'h21' )
77 + LJU_host = self.addHost( 'h22' )
78 + BUD_host = self.addHost( 'h23' )
79 + MLT_host = self.addHost( 'h24' )
80 + LUX_host = self.addHost( 'h25' )
81 + MAR_host = self.addHost( 'h26' )
82 + HAM_host = self.addHost( 'h27' )
83 + AMS_host = self.addHost( 'h28' )
84 +
85 + # add edges between switch and corresponding host
86 + self.addLink( ATH , ATH_host )
87 + self.addLink( LIS , LIS_host )
88 + self.addLink( LON , LON_host )
89 + self.addLink( BRU , BRU_host )
90 + self.addLink( PAR , PAR_host )
91 + self.addLink( DUB , DUB_host )
92 + self.addLink( MAD , MAD_host )
93 + self.addLink( GEN , GEN_host )
94 + self.addLink( MIL , MIL_host )
95 + self.addLink( SOF , SOF_host )
96 + self.addLink( BUC , BUC_host )
97 + self.addLink( VIE , VIE_host )
98 + self.addLink( FRA , FRA_host )
99 + self.addLink( COP , COP_host )
100 + self.addLink( TLN , TLN_host )
101 + self.addLink( RIG , RIG_host )
102 + self.addLink( KAU , KAU_host )
103 + self.addLink( POZ , POZ_host )
104 + self.addLink( PRA , PRA_host )
105 + self.addLink( BRA , BRA_host )
106 + self.addLink( ZAG , ZAG_host )
107 + self.addLink( LJU , LJU_host )
108 + self.addLink( BUD , BUD_host )
109 + self.addLink( MLT , MLT_host )
110 + self.addLink( LUX , LUX_host )
111 + self.addLink( MAR , MAR_host )
112 + self.addLink( HAM , HAM_host )
113 + self.addLink( AMS , AMS_host )
114 +
115 + # add edges between switches
116 + self.addLink( ATH , MIL, bw=10 )
117 + self.addLink( MIL , VIE, bw=10 )
118 + self.addLink( MIL , MAR, bw=10 )
119 + self.addLink( MIL , GEN, bw=10 )
120 + self.addLink( MIL , MLT, bw=10 )
121 + self.addLink( GEN , FRA, bw=10 )
122 + self.addLink( GEN , PAR, bw=10 )
123 + self.addLink( GEN , MAR, bw=10 )
124 + self.addLink( MAR , MAD, bw=10 )
125 + self.addLink( MAD , PAR, bw=10 )
126 + self.addLink( MAD , LIS, bw=10 )
127 + self.addLink( LIS , LON, bw=10 )
128 + self.addLink( LON , PAR, bw=10 )
129 + self.addLink( LON , DUB, bw=10 )
130 + self.addLink( LON , BRU, bw=10 )
131 + self.addLink( BRU , AMS, bw=10 )
132 + self.addLink( AMS , LUX, bw=10 )
133 + self.addLink( LUX , FRA, bw=10 )
134 + self.addLink( AMS , HAM, bw=10 )
135 + self.addLink( HAM , FRA, bw=10 )
136 + self.addLink( HAM , COP, bw=10 )
137 + self.addLink( COP , AMS, bw=10 )
138 + self.addLink( FRA , POZ, bw=10 )
139 + self.addLink( FRA , PRA, bw=10 )
140 + self.addLink( FRA , BUD, bw=10 )
141 + self.addLink( FRA , VIE, bw=10 )
142 + self.addLink( POZ , PRA, bw=10 )
143 + self.addLink( POZ , KAU, bw=10 )
144 + self.addLink( KAU , RIG, bw=10 )
145 + self.addLink( ZAG , VIE, bw=10 )
146 + self.addLink( ZAG , BUD, bw=10 )
147 + self.addLink( BUD , PRA, bw=10 )
148 + self.addLink( BUD , BRA, bw=10 )
149 + self.addLink( BUD , BUC, bw=10 )
150 + self.addLink( BUD , SOF, bw=10 )
151 + self.addLink( BUD , LJU, bw=10 )
152 + self.addLink( BUC , SOF, bw=10 )
153 + self.addLink( BUC , VIE, bw=10 )
154 + self.addLink( VIE , BRA, bw=10 )
155 + self.addLink( RIG , TLN, bw=10 )
156 + self.addLink( TLN , HAM, bw=10 )
157 +
158 +
159 +topos = { 'att': ( lambda: GeantMplsTopo() ) }
160 +
161 +if __name__ == '__main__':
162 + from onosnet import run
163 + run( GeantMplsTopo() )