Fastest Path Routing

Fastest Path Routing#

This example demonstrates how to use OpenOptics library functions to implement URO [1]/HOHO [2]. URO routes packets through the fastest path on arbitary topologies. You can configure HOHO routing with openoptics.OpticalRouting.routing_hoho().

examples/routing_hoho.py#
 1from openoptics import Toolbox, OpticalTopo, OpticalRouting
 2
 3if __name__ == "__main__":
 4    nb_node = 4
 5    nb_link = 1
 6    net = Toolbox.BaseNetwork(
 7        name="my_network",
 8        backend="Mininet",
 9        nb_node=nb_node,
10        time_slice_duration_ms=128,  # in ms
11        ocs_tor_link_bw=20,
12        use_webserver=True,
13    )
14    circuits = OpticalTopo.opera(nb_node=nb_node, nb_link=nb_link)
15    assert net.deploy_topo(circuits)
16    paths = OpticalRouting.routing_hoho(net.get_topo(), max_hop=2)
17    assert net.deploy_routing(paths, routing_mode="Per-hop")
18    net.start()