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 arbitrary topologies. You can configure HOHO routing with openoptics.OpticalRouting.routing_hoho().

examples/mininet_routing_hoho_per_hop.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="mininet_routing_hoho_per_hop",
 8        backend="Mininet",
 9        nb_node=nb_node,
10        time_slice_duration_ms=128,  # in ms
11        ocs_tor_link_bw_gbps=0.02,
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())
17    assert net.deploy_routing(paths, routing_mode="Per-hop")
18    net.start()