diff --git a/start_testbed.py b/start_testbed.py index 1381b99fa68a1b05470e879b03f1d58b0f3386ec..52eec783e55f593c6fa07e91f617b766b6d10e72 100755 --- a/start_testbed.py +++ b/start_testbed.py @@ -54,6 +54,13 @@ def connect_nodes(node1, node2): 'ip', 'link', 'add', dev_1, 'type', 'veth', 'peer', 'name', dev_2 ]) + + # Configure the link for network emulation. + subprocess.call([ + 'sudo', + 'tc', 'qdisc', 'add', 'dev', dev_1, 'root', 'handle', '1:0', 'netem' + ]) + # Add the link endpoints to the container namespaces. def add_to_ns(dev,ns): subprocess.call([