fnss.topologies.datacenter.two_tier_topology¶
-
two_tier_topology
(n_core, n_edge, n_hosts)[source]¶ Return a two-tier datacenter topology.
This topology comprises switches organized in two tiers (core and edge) and hosts connected to edge routers. Each core switch is connected to each edge switch while each host is connected to exactly one edge switch.
- Each node has two attributes:
- type: can either be switch or host
- tier: can either be core, edge or leaf. Nodes in the leaf tier are only host, while all core and edge nodes are switches.
Each edge has an attribute type as well which can either be core_edge if it connects a core and an edge switch or edge_leaf if it connects an edge switch to a host.
Parameters: - n_core : int
Total number of core switches
- n_edge : int
Total number of edge switches
- n_hosts : int
Number of hosts connected to each edge switch.
Returns: - topology : DatacenterTopology