dumbbell_topology(m1, m2)[source]

Return a dumbbell topology consisting of two star topologies connected by a path.

More precisely, two star graphs K_{m1} form the left and right bells, and are connected by a path P_{m2}.

The 2*m1+m2 nodes are numbered as follows.
  • 0,...,m1-1 for the left barbell,
  • m1,...,m1+m2-1 for the path,
  • m1+m2,...,2*m1+m2-1 for the right barbell.

The 3 subgraphs are joined via the edges (m1-1,m1) and (m1+m2-1,m1+m2). If m2 = 0, this is merely two star topologies joined together.

Please notice that this dumbbell topology is different from the barbell graph generated by networkx’s barbell_graph function. That barbell graph consists of two complete graphs connected by a path. This consists of two stars whose roots are connected by a path. This dumbbell topology is particularly useful for simulating transport layer protocols.

All nodes and edges of this topology have an attribute type which can be either right bell, core or left_bell

m1 : int

The number of nodes in each bell

m2 : int

The number of nodes in the path

topology : A Topology object