From 014ce441c4d9bc740abe0dcecb11f83c02094c89 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Fri, 3 Jul 2020 15:38:13 +0200 Subject: [PATCH] ping between all pairs of client/server IP addresses --- core/experiment.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/experiment.py b/core/experiment.py index 0b9ce40..ac22634 100644 --- a/core/experiment.py +++ b/core/experiment.py @@ -362,11 +362,12 @@ class Experiment(object): self.topo.command_to(self.topo_config.client, "rm {}".format(Experiment.PING_OUTPUT)) count = self.experiment_parameter.get(ExperimentParameter.PING_COUNT) - for i in range(0, self.topo_config.client_interface_count()): - cmd = self.ping_command(self.topo_config.get_client_ip(i), - self.topo_config.get_server_ip(interface_index=0), n=count) - logging.info(cmd) - self.topo.command_to(self.topo_config.client, cmd) + for j in range(0, self.topo_config.server_interface_count()): + for i in range(0, self.topo_config.client_interface_count()): + cmd = self.ping_command(self.topo_config.get_client_ip(i), + self.topo_config.get_server_ip(interface_index=j), n=count) + logging.info(cmd) + self.topo.command_to(self.topo_config.client, cmd) def ping_command(self, from_ip, to_ip, n=5): return "ping -c {} -I {} {} >> {}".format(n, from_ip, to_ip, Experiment.PING_OUTPUT)