Internet wrapper for AutoNetkit
Create Internet, loading from filename.
Example usage:
>>> inet = Internet("multias")
Set compiler to configure DNS.
Example usage:
>>> inet = ank.internet.Internet()
>>> inet.add_dns()
Compile into device configuration files.
Example usage:
>>> inet = ank.internet.Internet()
>>> inet.compile()
>>> inet = ank.internet.Internet()
>>> inet.compile()
Deploy compiled configuration files.”
Example usage:
>>> inet = ank.internet.Internet()
>>> inet.deploy()
Dumps overlay graphs to file
Note
Doesn’t currently support saving graphs - NetworkX cannot save nodes/edges with dictionary attributes
Loads the network description from a graph file. Note this is done automatically if a filename is given to the Internet constructor.
Example usage:
>>> inet = ank.internet.Internet()
>>> inet.load("simple")
>>> sorted(inet.network.graph.nodes())
[RouterB.AS1, RouterA.AS1, RouterD.AS2, RouterC.AS1, RouterA.AS2, RouterA.AS3, RouterB.AS2, RouterC.AS2]
>>> inet = ank.internet.Internet()
>>> inet.load("singleas")
>>> sorted(inet.network.graph.nodes())
[1a.AS1, 1b.AS1, 1d.AS1, 1c.AS1]
>>> inet = ank.internet.Internet()
>>> inet.load("multias")
>>> sorted(inet.network.graph.nodes())
[1b.AS1, 1a.AS1, 2d.AS2, 1c.AS1, 2a.AS2, 3a.AS3, 2b.AS2, 2c.AS2]