From 176a73260b4b71a38d1ebaef503644f8c5d9a866 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Thu, 2 Jul 2020 16:38:45 +0200 Subject: [PATCH] WIP: typo --- topos/multi_interface.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/topos/multi_interface.py b/topos/multi_interface.py index ec09bb4..f6812a8 100644 --- a/topos/multi_interface.py +++ b/topos/multi_interface.py @@ -123,9 +123,9 @@ class MultiInterfaceConfig(TopoConfig): self.get_router_ip_to_server_switch(i), router_interface_mac)) for i in range(int(self.topo.topo_parameter.get(TopoParameter.SERVER_PATHS))): - cmd = self.interface_up_command(self.get_server_interface(i), self.get_server_ip(i), netmask) + cmd = self.interface_up_command(self.get_server_interface(0, i), self.get_server_ip(i), netmask) self.topo.command_to(self.server, cmd) - server_interface_mac = self.server.intf(self.get_server_interface(i)).MAC() + server_interface_mac = self.server.intf(self.get_server_interface(0, i)).MAC() self.topo.command_to(self.router, "arp -s {} {}".format( self.get_server_ip(i), server_interface_mac)) @@ -139,10 +139,10 @@ class MultiInterfaceConfig(TopoConfig): return "{}{}.2".format(self.param.get(TopoParameter.LEFT_SUBNET), switch_index) def get_router_ip_to_server_switch(self, switch_index): - return "{}{}.2".format(self.param.get(TopoParameter.RIGHT_SUBNET)) + return "{}{}.2".format(self.param.get(TopoParameter.RIGHT_SUBNET), switch_index) def get_server_ip(self, interface_index): - return "{}{}.1".format(self.param.get(TopoParameter.RIGHT_SUBNET)) + return "{}{}.1".format(self.param.get(TopoParameter.RIGHT_SUBNET), interface_index) def get_server_subnet(self, interface_index): return "{}{}.0/24".format(self.param.get(TopoParameter.RIGHT_SUBNET), interface_index) @@ -159,5 +159,5 @@ class MultiInterfaceConfig(TopoConfig): def get_router_interface_to_switch(self, interface_index): return "{}-eth{}".format(self.topo.get_router_name(0), interface_index) - def get_server_interface(self, server_index): - return "{}-eth0".format(self.topo.get_server_name(server_index)) \ No newline at end of file + def get_server_interface(self, server_index, interface_index): + return "{}-eth{}".format(self.topo.get_server_name(server_index), interface_index) \ No newline at end of file