mnoptical.ofcdemo.demolib

demolib.py: OFC Demo Topology and CLI

Our demo topology is a cross-connected mesh of 6 POPs.

Module Contents

Classes

OpticalCLI

Extended CLI with optical network commands

OpticalTopo

Topo with convenience methods for optical links

LinearRoadmTopo

A linear network with a single ROADM and three POPs

DemoTopo

OFC Demo Topology

Functions

spanSpec(length, amp, **ampParams)

Return span specifier [length, (ampName, params)]

configureLinearNet(net[, packetOnly])

Configure linear network locally

linearRoadmTest()

Test Linear ROADM topology

Attributes

ListenPortBase

CLI

SpanSpec

AmpSpec

net

mnoptical.ofcdemo.demolib.ListenPortBase = 6653
class mnoptical.ofcdemo.demolib.OpticalCLI

Bases: mininet.cli.CLI

Extended CLI with optical network commands

prompt = 'mininet-optical> '
do_signals(nodename)

Print node signals

static formatSigState(state)

Return formatted signal state string

printSignals(model)

Print signals from a node’s model

Return optical links

static printNodeSignals(node)

print a node’s signals

do_linksignals(line='')

linksignals {pattern}: Print signals for links between ROADMs

_fmtSigState(state)

Return formatted signal state

_fmtPathEntry(entry)

Format path entry

do_sigtrace(line)

sigtrace node [ch]: trace signal(s) originating at node

_printPathState(paths)

Print out path state for each signal:path in paths

do_sigpath(line)

sigpath node [ch]: return path of signal(s) starting at node

do_monitors(_line)

List monitors on optical links and nodes

static printOsnr(monitor)
do_osnr(_line)

List osnr for monitors

spans(minlength=100)

Span iterator

do_spans(_line)

List spans between nodes

do_plot(line)

plot ROADM topology; ‘plot save’ to save to plot.png

do_propagate(_line)

Obsolete: propagate signals manually

do_amppowers(_line)

Print out power for all amps on links

do_arp(_line)

Send gratuitous arps from every host

do_checkroadms(line)

checkroadms {roadm…}: Check signals going through one or more ROADMs

checklinks {pattern}: Check signals going through links

do_reset(line)

reset {node…}: reset one or all optical nodes

do_setgain(line)

Set amplifier gain for demo/testing purposes usage: setgain src dst amp gain

mnoptical.ofcdemo.demolib.CLI
class mnoptical.ofcdemo.demolib.OpticalTopo

Bases: mininet.topo.Topo

Topo with convenience methods for optical links

Convenience function to add an OpticalLink

Clarifying alias for addLink

mnoptical.ofcdemo.demolib.SpanSpec
mnoptical.ofcdemo.demolib.AmpSpec
mnoptical.ofcdemo.demolib.spanSpec(length, amp, **ampParams)

Return span specifier [length, (ampName, params)]

class mnoptical.ofcdemo.demolib.LinearRoadmTopo

Bases: OpticalTopo

A linear network with a single ROADM and three POPs

h1 - s1 - t1 = r1 — r2 — r3 = t3 - s3 - h3

|| t2 - s2 - h2

h1-h3: hosts s1-s3: routers (downlink: eth0, uplink: eth1, eth2) t1-t3: terminals (downlink: eth1, eth2, uplink: wdm3, wdm4) r1-r3: ROADMs (add/drop: wdm1, wdm2, line: wdm3, wdm4)

static ip(pop, intfnum=0, template='10.%d.0.%d', subnet='/24')

Return a local IP address or subnet for the given POP

buildPop(p, txCount=2)

Build a POP; returns: ROADM

spans(spanLength=50 * km, spanCount=4)

Return a list of span specifiers (length, (amp, params)) the compensation amplifiers are named prefix-ampN

build(n=3, txCount=2)

Add POPs and connect them in a line

mnoptical.ofcdemo.demolib.configureLinearNet(net, packetOnly=False)

Configure linear network locally Channel usage: r1<->r2: 1 r1<->r3: 2 r2<->r3: 1

mnoptical.ofcdemo.demolib.linearRoadmTest()

Test Linear ROADM topology

class mnoptical.ofcdemo.demolib.DemoTopo

Bases: LinearRoadmTopo

OFC Demo Topology

This network consists of a ring of six POPs with two cross-connections.

POP2 – POP4

/ | | / | | POP1 | | POP6

| | /
| | /

POP3 – POP5

All of the links are bidirectional.

Each POP consists of a host, router, optical terminal, and ROADM:

h1 - s1 - t1 - r1 h2 - s2 - t2 - r2 etc.

Construct a link of four 50km fiber spans

build(n=6, txCount=5)

Add POPs and connect them in a ring with some cross-connects

mnoptical.ofcdemo.demolib.net