tests.router_tree
This MC creates a router high-degree tree running OSPF and BGP. The leaves of the tree are subnets that include a variable number of host endpoints and have a single gateway router. The routers at the leaf subnets use OSPF to advertise connectivity of their endpoints. The leaf routers then redistribute their OSPF routes to upstream BGP routers, eventually culminating in the BGP router at the root of the topology tree. The user must pass in a degree for the tree (i.e. the desired number of OSPF branches.)
The following diagram depicts the result of running the router tree topology with a parameter of three:
<host> -- <OSPF> -- <BGP> -------------------------
| | |
<BGP 0> <BGP 1> <BGP 2>
| | |
<OSPF 0> <OSPF 1> <OSPF 2>
| | |
<host 0> <host 1> <host 2>
This MC primarily serves as part of the functional testing suite and as an example for building complex routed networks using FIREWHEEL. For more information please see Running the Router Tree Topology.
- Attribute Provides:
topology
- Attribute Depends:
graph
- Model Component Dependencies:
Plugin
- class tests.router_tree_plugin.RouterTree(graph, log)[source]
Bases:
AbstractPlugin
This creates a router high-degree tree running OSPF and BGP.
Following is an example of a 3 degree tree:
<host> -- <OSPF> -- <BGP> ------------------------- | | | <BGP 0> <BGP 1> <BGP 2> | | | <OSPF 0> <OSPF 1> <OSPF 2> | | | <host 0> <host 1> <host 2>
- __annotations__ = {}
- _make_router_pair(name, control_nets, host_nets, as_nums)[source]
Internal function to create the host, OSPF, BGP sequence.
- Parameters:
name (str) – The name of the router/host sequence (e.g. ‘leaf-1.net’).
control_nets (netaddr.IPNetwork) – The network to use between routers.
host_nets (netaddr.IPNetwork) – The network to use between hosts.
as_nums (range_iterator) – An iterator for the AS numbering of the BGP routers.
- Returns:
The BGP router for the pairing.
- Return type: