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:
Every pair of nodes gets a unique channel
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¶
|
Configure and monitor network with N=3 channels for each path |
|
Return link in canonical (sorted) format |
|
Key for sorting monitor names |
|
Monitor gOSNR continuously; if any monitored gOSNR drops |
|
Return an adjacency dict for links |
|
Allocate N channels per endpoint pair |
|
Route from src to destinations |
|
Return list of entries in paths containing badlink |
|
Reroute failures |
|
Configure terminals statically: ethN <-> wdmM:channel |
Configure Open vSwitch 'routers' using OpenFlow |
|
|
Program a lightpath into the network |
|
Return the {router, terminal, roadm} ports for node/channels |
|
|
|
Calculate average channel count per link |
Attributes¶
- 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¶