Simon Hunt

GUI -- added topo script and configuration for projection onto UK map.

Change-Id: Id87991aca319f6c2bf5bd2c9f0735592ad4c4b1f
{
"devices": {
"of:0000000000000001": { "basic": { "name": "LONDON", "latitude": 51.5072, "longitude": -0.1275 }},
"of:0000000000000002": { "basic": { "name": "BRISTL", "latitude": 51.4500, "longitude": -2.5833 }},
"of:0000000000000003": { "basic": { "name": "BIRMHM", "latitude": 52.4831, "longitude": -1.8936 }},
"of:0000000000000004": { "basic": { "name": "PLYMTH", "latitude": 50.3714, "longitude": -4.1422 }},
"of:0000000000000005": { "basic": { "name": "DOVER", "latitude": 51.1295, "longitude": 1.3089 }},
"of:0000000000000006": { "basic": { "name": "BRGHTN", "latitude": 50.8429, "longitude": -0.1313 }},
"of:0000000000000007": { "basic": { "name": "LIVRPL", "latitude": 53.4000, "longitude": -3.0000 }},
"of:0000000000000008": { "basic": { "name": "YORK", "latitude": 53.9583, "longitude": -1.0803 }},
"of:0000000000000009": { "basic": { "name": "NWCSTL", "latitude": 54.9667, "longitude": -1.6000 }},
"of:000000000000000a": { "basic": { "name": "NRWICH", "latitude": 52.6283, "longitude": 1.2967 }},
"of:000000000000000b": { "basic": { "name": "EDBUGH", "latitude": 55.9531, "longitude": -3.1889 }},
"of:000000000000000c": { "basic": { "name": "ABYSTW", "latitude": 52.4140, "longitude": -4.0810 }}
},
"hosts": {
"00:00:00:00:00:01/-1": { "basic": { "location": "of:0000000000000001/1", "ips": [ "10.0.0.1" ], "name": "LONDON", "latitude": 51.9798, "longitude": 0.0671 }},
"00:00:00:00:00:02/-1": { "basic": { "location": "of:0000000000000002/1", "ips": [ "10.0.0.2" ], "name": "BRISTL", "latitude": 51.1693, "longitude": -2.5234 }},
"00:00:00:00:00:03/-1": { "basic": { "location": "of:0000000000000003/1", "ips": [ "10.0.0.3" ], "name": "BIRMHM", "latitude": 52.2088, "longitude": -1.7738 }},
"00:00:00:00:00:04/-1": { "basic": { "location": "of:0000000000000004/1", "ips": [ "10.0.0.4" ], "name": "PLYMTH", "latitude": 50.7991, "longitude": -4.1871 }},
"00:00:00:00:00:05/-1": { "basic": { "location": "of:0000000000000005/1", "ips": [ "10.0.0.5" ], "name": "DOVER", "latitude": 51.4570, "longitude": 1.6981 }},
"00:00:00:00:00:06/-1": { "basic": { "location": "of:0000000000000006/1", "ips": [ "10.0.0.6" ], "name": "BRGHTN", "latitude": 50.5870, "longitude": 0.2429 }},
"00:00:00:00:00:07/-1": { "basic": { "location": "of:0000000000000007/1", "ips": [ "10.0.0.7" ], "name": "LIVRPL", "latitude": 53.1044, "longitude": -3.0899 }},
"00:00:00:00:00:08/-1": { "basic": { "location": "of:0000000000000008/1", "ips": [ "10.0.0.8" ], "name": "YORK", "latitude": 54.2567, "longitude": -0.7510 }},
"00:00:00:00:00:09/-1": { "basic": { "location": "of:0000000000000009/1", "ips": [ "10.0.0.9" ], "name": "NWCSTL", "latitude": 55.3089, "longitude": -1.4952 }},
"00:00:00:00:00:0a/-1": { "basic": { "location": "of:000000000000000a/1", "ips": [ "10.0.0.10" ], "name": "NRWICH", "latitude": 52.9722, "longitude": 1.4613 }},
"00:00:00:00:00:0b/-1": { "basic": { "location": "of:000000000000000b/1", "ips": [ "10.0.0.11" ], "name": "EDBUGH", "latitude": 55.7009, "longitude": -3.6230 }},
"00:00:00:00:00:0c/-1": { "basic": { "location": "of:000000000000000c/1", "ips": [ "10.0.0.12" ], "name": "ABYSTW", "latitude": 52.0745, "longitude": -4.1444 }}
}
}
#!/usr/bin/env python
"""
"""
from mininet.topo import Topo
class UkTopo( Topo ):
"""Internet Topology Zoo Specimen."""
def __init__( self ):
"""Create a topology."""
# Initialize Topology
Topo.__init__( self )
# add nodes, switches first...
LONDON = self.addSwitch( 's1' )
BRISTL = self.addSwitch( 's2' )
BIRMHM = self.addSwitch( 's3' )
PLYMTH = self.addSwitch( 's4' )
DOVER = self.addSwitch( 's5' )
BRGHTN = self.addSwitch( 's6' )
LIVRPL = self.addSwitch( 's7' )
YORK = self.addSwitch( 's8' )
NWCSTL = self.addSwitch( 's9' )
NRWICH = self.addSwitch( 's10' )
EDBUGH = self.addSwitch( 's11' )
ABYSTW = self.addSwitch( 's12' )
# ... and now hosts
LONDON_host = self.addHost( 'h1' )
BRISTL_host = self.addHost( 'h2' )
BIRMHM_host = self.addHost( 'h3' )
PLYMTH_host = self.addHost( 'h4' )
DOVER_host = self.addHost( 'h5' )
BRGHTN_host = self.addHost( 'h6' )
LIVRPL_host = self.addHost( 'h7' )
YORK_host = self.addHost( 'h8' )
NWCSTL_host = self.addHost( 'h9' )
NRWICH_host = self.addHost( 'h10' )
EDBUGH_host = self.addHost( 'h11' )
ABYSTW_host = self.addHost( 'h12' )
# add edges between switch and corresponding host
self.addLink( LONDON, LONDON_host )
self.addLink( BRISTL, BRISTL_host )
self.addLink( BIRMHM, BIRMHM_host )
self.addLink( PLYMTH, PLYMTH_host )
self.addLink( DOVER, DOVER_host )
self.addLink( BRGHTN, BRGHTN_host )
self.addLink( LIVRPL, LIVRPL_host )
self.addLink( YORK, YORK_host )
self.addLink( NWCSTL, NWCSTL_host )
self.addLink( NRWICH, NRWICH_host )
self.addLink( EDBUGH, EDBUGH_host )
self.addLink( ABYSTW, ABYSTW_host )
# add edges between switches
self.addLink( LONDON, BRISTL, bw=10, delay='1.0ms')
self.addLink( LONDON, BRISTL, bw=10, delay='1.0ms')
self.addLink( LONDON, BIRMHM, bw=10, delay='1.0ms')
self.addLink( BRISTL, BIRMHM, bw=10, delay='1.0ms')
self.addLink( BRISTL, PLYMTH, bw=10, delay='1.0ms')
self.addLink( LONDON, PLYMTH, bw=10, delay='1.0ms')
self.addLink( LONDON, DOVER, bw=10, delay='1.0ms')
self.addLink( LONDON, BRGHTN, bw=10, delay='1.0ms')
self.addLink( DOVER, BRGHTN, bw=10, delay='1.0ms')
self.addLink( BIRMHM, LIVRPL, bw=10, delay='1.0ms')
self.addLink( BIRMHM, YORK, bw=10, delay='1.0ms')
self.addLink( NWCSTL, YORK, bw=10, delay='1.0ms')
self.addLink( NWCSTL, LIVRPL, bw=10, delay='1.0ms')
self.addLink( LONDON, YORK, bw=10, delay='1.0ms')
self.addLink( LONDON, YORK, bw=10, delay='1.0ms')
self.addLink( LONDON, NRWICH, bw=10, delay='1.0ms')
self.addLink( DOVER, NRWICH, bw=10, delay='1.0ms')
self.addLink( YORK, NRWICH, bw=10, delay='1.0ms')
self.addLink( YORK, LIVRPL, bw=10, delay='1.0ms')
self.addLink( NWCSTL, EDBUGH, bw=10, delay='1.0ms')
self.addLink( LIVRPL, EDBUGH, bw=10, delay='1.0ms')
self.addLink( LIVRPL, ABYSTW, bw=10, delay='1.0ms')
self.addLink( BRISTL, ABYSTW, bw=10, delay='1.0ms')
topos = { 'uk': ( lambda: UkTopo() ) }