Examples

Single AS:

Multi AS:

Examples

AutoNetkit.examples.examples.example_single_as()[source]

Single AS example topology

>>> network = example_single_as()
>>> sorted(network.graph.nodes())
[1a.AS1, 1b.AS1, 1c.AS1, 1d.AS1]
>>> sorted(network.graph.edges())
[(1a.AS1, 1b.AS1), (1b.AS1, 1a.AS1), (1b.AS1, 1c.AS1), (1b.AS1, 1d.AS1), (1c.AS1, 1b.AS1), (1c.AS1, 1d.AS1), (1d.AS1, 1b.AS1), (1d.AS1, 1c.AS1)]
AutoNetkit.examples.examples.example_multi_as()[source]

Multi AS example topology

#TODO: update these with bi-directional edges

>>> network = example_multi_as()
>>> sorted(network.graph.nodes())
[1a.AS1, 1b.AS1, 1c.AS1, 2a.AS2, 2b.AS2, 2c.AS2, 2d.AS2, 3a.AS3]
>>> sorted(network.graph.edges())
[(1a.AS1, 1b.AS1), (1a.AS1, 1c.AS1), (1b.AS1, 1a.AS1), (1b.AS1, 1c.AS1), (1b.AS1, 3a.AS3), (1c.AS1, 1a.AS1), (1c.AS1, 1b.AS1), (1c.AS1, 2a.AS2), (2a.AS2, 1c.AS1), (2a.AS2, 2b.AS2), (2a.AS2, 2d.AS2), (2b.AS2, 2a.AS2), (2b.AS2, 2c.AS2), (2c.AS2, 2b.AS2), (2c.AS2, 2d.AS2), (2d.AS2, 2a.AS2), (2d.AS2, 2c.AS2), (2d.AS2, 3a.AS3), (3a.AS3, 1b.AS1), (3a.AS3, 2d.AS2)]