to_mininet(topology, switches=None, hosts=None, relabel_nodes=True)[source]

Convert an FNSS topology to Mininet Topo object that can be used to deploy a Mininet network.

If the links of the topology are labeled with delays, capacities or buffer sizes, the returned Mininet topology will also include those parameters.

However, it should be noticed that buffer sizes are included in the converted topology only if they are expressed in packets. If buffer sizes are expressed in the form of bytes they will be discarded. This is because Mininet only supports buffer sizes expressed in packets.

topology : Topology, DirectedTopology or DatacenterTopology

An FNSS Topology object

switches : list, optional

List of topology nodes acting as switches

hosts : list, optional

List of topology nodes acting as hosts

relabel_nodes : bool, optional

If True, rename node labels according to Mininet conventions. In Mininet all node labels are strings whose values are “h1”, “h2”, … if the node is a host or “s1”, “s2”, … if the node is a switch.

topology : Mininet Topo

A Mininet topology object


It is not necessary to provide a list of switch and host nodes if the topology object provided are already annotated with a type attribute that can have values host or switch. This is the case of datacenter topologies generated with FNSS which already include information about which nodes are hosts and which are switches.

If switches and hosts are passed as arguments, then the hosts and switches sets must be disjoint and their union must coincide to the set of all topology nodes. In other words, there cannot be nodes labeled as both host and switch and there cannot be nodes that are neither a host nor a switch.

It is important to point out that if the topology contains loops, it will not work with the ovs-controller and controller provided by Mininet. It will be necessary to use custom controllers. Further info here.