From f9786312ca5eb830ec2c07479627dc31ef3c9e30 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Sun, 8 May 2016 19:48:39 +0200 Subject: [PATCH] mpLinkCharacteristics: working! --- src/mpLinkCharacteristics.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mpLinkCharacteristics.py b/src/mpLinkCharacteristics.py index f6d2a98..ac99673 100644 --- a/src/mpLinkCharacteristics.py +++ b/src/mpLinkCharacteristics.py @@ -3,9 +3,9 @@ class MpLinkCharacteristics: - tcNetemParent = "5:1" + tcNetemParent = "1:1" tcHtbClassid = "10" - tcNetemHandle = "10:" + tcNetemHandle = "1:10" def __init__(self, id, delay, queueSize, bandwidth, loss, back_up=False): self.id = id @@ -34,8 +34,8 @@ class MpLinkCharacteristics: for n in self.netemAt: cmd = cmd + "sleep " + str(n.delta) cmd = cmd + " && (( tc qdisc del dev " + ifname + " root " - cmd = cmd + " && tc qdisc add dev " + ifname + " root handle 5:1 htb direct_qlen " + self.queueSize + " && tc class add dev " + ifname + " " - cmd = cmd + " parent 5:1 " + cmd = cmd + " && tc qdisc add dev " + ifname + " root handle 1: htb default 10 direct_qlen " + self.queueSize + " && tc class add dev " + ifname + " " + cmd = cmd + " parent 1:1 " cmd = cmd + " classid " + MpLinkCharacteristics.tcHtbClassid cmd = cmd + " htb rate " + self.bandwidth + "mbit" cmd = cmd + " burst " + str(int(self.queueSize) * 1500) + ") || "