mnoptical.ofcdemo.apsp

apsp.py: all-pairs-shortest-paths routing for ofc demo

The goal is not to demonstrate an elaborate routing and rebalancing algorithm, but to demonstrate how mininet-optical enables packet-optical SDN controller development and experimentation!!

So our routing is extremely simple:

  1. Every pair of nodes gets a unique channel

  2. Routes are shortest paths

Since all the links are the same length, we don’t even have to use Dijkstra’s algorithm - BFS works just fine!

Module Contents

Functions

run(net[, N])

Configure and monitor network with N=3 channels for each path

canonical(link)

Return link in canonical (sorted) format

monitorKey(monitor)

Key for sorting monitor names

monitorOSNR(net[, gosnrThreshold])

Monitor gOSNR continuously; if any monitored gOSNR drops

adjacencyDict(links)

Return an adjacency dict for links

allocateChannels(terminals, N)

Allocate N channels per endpoint pair

route(src, neighbors, destinations)

Route from src to destinations

entriesToReroute(paths, badlink)

Return list of entries in paths containing badlink

reroute(net, failures)

Reroute failures

configureTerminals(net[, power])

Configure terminals statically: ethN <-> wdmM:channel

configurePacketSwitches(net)

Configure Open vSwitch 'routers' using OpenFlow

installPath(path, channels, net)

Program a lightpath into the network

channelPorts(node, net)

Return the {router, terminal, roadm} ports for node/channels

installRoutes(net)

countSignals(channelPairs, routes)

Calculate average channel count per link

Attributes

net

mnoptical.ofcdemo.apsp.run(net, N=3)

Configure and monitor network with N=3 channels for each path

mnoptical.ofcdemo.apsp.canonical(link)

Return link in canonical (sorted) format

mnoptical.ofcdemo.apsp.monitorKey(monitor)

Key for sorting monitor names

mnoptical.ofcdemo.apsp.monitorOSNR(net, gosnrThreshold=18.0)

Monitor gOSNR continuously; if any monitored gOSNR drops below threshold, return list of (monitor, channel, link)

mnoptical.ofcdemo.apsp.adjacencyDict(links)

Return an adjacency dict for links

mnoptical.ofcdemo.apsp.allocateChannels(terminals, N)

Allocate N channels per endpoint pair

mnoptical.ofcdemo.apsp.route(src, neighbors, destinations)

Route from src to destinations neighbors: adjacency list returns: routes dict

mnoptical.ofcdemo.apsp.entriesToReroute(paths, badlink)

Return list of entries in paths containing badlink

mnoptical.ofcdemo.apsp.reroute(net, failures)

Reroute failures

mnoptical.ofcdemo.apsp.configureTerminals(net, power=0.0)

Configure terminals statically: ethN <-> wdmM:channel

mnoptical.ofcdemo.apsp.configurePacketSwitches(net)

Configure Open vSwitch ‘routers’ using OpenFlow

mnoptical.ofcdemo.apsp.installPath(path, channels, net)

Program a lightpath into the network

mnoptical.ofcdemo.apsp.channelPorts(node, net)

Return the {router, terminal, roadm} ports for node/channels

mnoptical.ofcdemo.apsp.installRoutes(net)
mnoptical.ofcdemo.apsp.countSignals(channelPairs, routes)

Calculate average channel count per link

mnoptical.ofcdemo.apsp.net