diff --git a/src/mpECMPSingleInterfaceConfig.py b/src/mpECMPSingleInterfaceConfig.py index aa77c64..74c9886 100644 --- a/src/mpECMPSingleInterfaceConfig.py +++ b/src/mpECMPSingleInterfaceConfig.py @@ -154,3 +154,14 @@ class MpECMPSingleInterfaceConfig(MpConfig): def getServerInterface(self): return MpTopo.serverName + "-eth0" + def getMidLeftName(self, id): + return MpTopo.routerNamePrefix + str(id) + + def getMidRightName(self, id): + return MpTopo.switchNamePrefix + "1" + + def getMidL2RInterface(self, id): + return self.getMidLeftName(id) + "-eth1" + + def getMidR2LInterface(self, id): + return self.getMidRightName(id) + "-eth" + str(id+2) diff --git a/src/mpExperience.py b/src/mpExperience.py index 80ed614..a7b0f98 100644 --- a/src/mpExperience.py +++ b/src/mpExperience.py @@ -100,11 +100,13 @@ class MpExperience: def runTcpDump(self): #todo : replace filename by cst - if self.xpParam.getParam(MpParamXp.CLIENTPCAP) == "yes" : + cpcap = self.xpParam.getParam(MpParamXp.CLIENTPCAP) + spcap = self.xpParam.getParam(MpParamXp.SERVERPCAP) + if cpcap == "yes" : self.mpTopo.commandTo(self.mpConfig.client, "tcpdump -i any -w client.pcap &") - if self.xpParam.getParam(MpParamXp.SERVERPCAP) == "yes" : + if spcap == "yes" : self.mpTopo.commandTo(self.mpConfig.client, "tcpdump -i any -w server.pcap &") - self.mpTopo.commandTo(self.mpConfig.client, - "sleep 5") + if spcap == "yes" or cpcap == "yes": + self.mpTopo.commandTo(self.mpConfig.client,"sleep 5")