caida.prune_routers
This model component removes routers not involved in any shortest path within the network topology. It utilizes NetworkX to compute shortest paths, prunes non-essential routers and switches, and cleans up interfaces, BGP neighbors, and advertised networks. This ensures the network topology is optimized and contains only necessary components.
- Attribute Provides:
pruned_internet_ases
- Attribute Depends:
graph
- Model Component Dependencies:
Plugin
- class caida.prune_routers_plugin.PruneCAIDA(graph, log)[source]
Bases:
AbstractPluginRemoves all routers that aren’t in a shortest path.
Note
This plugin uses NetworkX directly to compute shortest paths.
- __annotate_func__ = None
- __annotations_cache__ = {}
- __firstlineno__ = 8
- __static_attributes__ = ('deleted_routers', 'to_delete')
- clean_up_interfaces_and_bgp_neighbors()[source]
Cleans up interfaces, BGP neighbors, and advertised networks.
- remove_unused_bgp_interfaces()[source]
Collects next hop IP addresses and removes unused BGP interfaces. Those interfaces would never be used and it’s best to boot a VM with the least number of interfaces as possible for performance reasons.
- restore_deleted_edges()[source]
Restores deleted edges. This method reverses the “deletion” process for the edges within FIREWHEEL. Currently, that process (
firewheel.control.experiment_graph.Edge.delete()) simply marks the edge as invalid and removes the edge from the graph. This method is the reverse of that operation. We do this to keep the same graph IDs and original objects.
- run()[source]
Finds and removes all routers that aren’t in a shortest path.
This method performs the following steps: 1. Weights edges and removes specific edges. 2. Removes all coloring from vertices. 3. Finds shortest paths and colors vertices in those paths. 4. Restores deleted edges. 5. Removes non-colored routers and switches. 6. Cleans up interfaces, BGP neighbors, and advertised networks. 7. Collects next hop IP addresses and removes unused BGP interfaces.