caida.test_topology
This model component creates a test CAIDA topology by connecting a specified number of hosts
to BGP networks.
It depends on internet_ases being provided (typically by caida.parse).
Therefore, once the basic CAIDA topology has been created then a user given number of routers with BGP networks is selected, hosts are created, and then connected to these select networks via the appropriate switches.
This can be combined with caida.prune_routers to create an Internet-like infrastructure with a user-provided number of hosts connected to them.
firewheel experiment caida.test_topology caida.prune_routers minimega.launch
An example output from this topology (using 2015 data) pruned down to 10 hosts is shown below. The cyan nodes are routers, the yellow ones are FIREWHEEL Switches, and the magenta are host systems.
- Attribute Provides:
topologycaida_topology
- Attribute Depends:
internet_ases
- Model Component Dependencies:
Plugin
- class caida.test_topology_plugin.Topology(graph, log)[source]
Bases:
AbstractPluginThis plugin creates a test CAIDA topology by connecting a specified number of hosts to BGP networks. It selects a given number of routers with BGP networks, creates hosts, and connects them to the appropriate switches.
- __annotate_func__ = None
- __annotations_cache__ = {}
- __firstlineno__ = 10
- __static_attributes__ = ()
- run(num_hosts='10')[source]
Executes the topology creation process.
The method performs the following steps: 1. Converts the num_hosts parameter to an integer. 2. Selects routers with BGP networks. 3. Chooses a specified number of routers randomly. 4. Creates hosts and connects them to the appropriate switches.
- Parameters:
num_hosts (str) – The number of hosts to create. This should be convertible to an Integer. Defaults to “10”.
- Raises:
ValueError – If the provided
num_hostsparameter is not an integer.RuntimeError – If no suitable nodes are found in the graph.