add netemChange support for ECMP topo

Signed-off-by: Benjamin Hesmans <benjamin.hesmans@uclouvain.be>
This commit is contained in:
Benjamin Hesmans 2015-01-21 10:38:11 +01:00
parent ca49762bd4
commit 78e71c7598
2 changed files with 17 additions and 4 deletions

View File

@ -154,3 +154,14 @@ class MpECMPSingleInterfaceConfig(MpConfig):
def getServerInterface(self): def getServerInterface(self):
return MpTopo.serverName + "-eth0" 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)

View File

@ -100,11 +100,13 @@ class MpExperience:
def runTcpDump(self): def runTcpDump(self):
#todo : replace filename by cst #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, self.mpTopo.commandTo(self.mpConfig.client,
"tcpdump -i any -w client.pcap &") "tcpdump -i any -w client.pcap &")
if self.xpParam.getParam(MpParamXp.SERVERPCAP) == "yes" : if spcap == "yes" :
self.mpTopo.commandTo(self.mpConfig.client, self.mpTopo.commandTo(self.mpConfig.client,
"tcpdump -i any -w server.pcap &") "tcpdump -i any -w server.pcap &")
self.mpTopo.commandTo(self.mpConfig.client, if spcap == "yes" or cpcap == "yes":
"sleep 5") self.mpTopo.commandTo(self.mpConfig.client,"sleep 5")