diff --git a/frr_config_topo.py b/frr_config_topo.py index 9cfa902..dbd52e4 100644 --- a/frr_config_topo.py +++ b/frr_config_topo.py @@ -90,7 +90,6 @@ def annotate_graph(graph: networkx.Graph): router ospf ospf router-id {ip} redistribute static - redistribute connected {networks} exit ! diff --git a/mnet/frr_topo.py b/mnet/frr_topo.py index d53f97c..18583d2 100644 --- a/mnet/frr_topo.py +++ b/mnet/frr_topo.py @@ -699,11 +699,6 @@ def _create_uplink( # ip route {ground station ip /32} {ground station pool ip} frr_router.config_frr("staticd", [ f"ip route {station.defaultIP()}/32 {format(ip1.ip)}" ]) - # After we remove redistribute connected, need to advertise the network in OSPF - # Perhaps use the passive config? - #frr_node.frr_config_commands(kkkk - # [ "router ospf", - # f"network {format(ip_nw)} area 0.0.0.0"]) def _remove_link(self, station_name: str, sat_name: str, ip_nw: ipaddress.IPv4Network) -> None: station_node = self.net.getNodeByName(station_name) diff --git a/mnet/pmonitor.py b/mnet/pmonitor.py index 116ffca..a9143a8 100644 --- a/mnet/pmonitor.py +++ b/mnet/pmonitor.py @@ -99,10 +99,10 @@ def get_status_list(db): TEST = False -def sample_target(db, name: str, address: str, stable: bool): +def sample_target(db, name: str, address: str, stable: bool, src_address: str): logging.info("sample target: %s", address) process = subprocess.run( - ["ping", "-c1", "-W3", f"{address}"], capture_output=True, text=True + ["ping", "-I", src_address, "-c1", "-W3", f"{address}"], capture_output=True, text=True ) logging.info("%s", process.stdout) sent, received = mininet.net.Mininet._parsePing(process.stdout) @@ -185,7 +185,7 @@ def monitor_targets(db_path_master: str, db_path_local: str, address: str): time.sleep(5) running = can_run(db_master, address) if running: - sample_target(db_local, target[0], target[1], target[2]) + sample_target(db_local, target[0], target[1], target[2], address) if TEST: set_can_run(db_master, address, False) running = can_run(db_master, address)