1

So I simply get this error when I enter this command in my master VM:

 sudo tc qdisc add dev eth0 root netem delay 97ms
RTNETLINK answers: File exists

Any idea how that could be fixed?

I am running this command in Ubuntu:

uname -a
Linux anmol-vm1-new 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@anmol-vm1-new:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:    14.04
Codename:   trusty

Here's the content of /etc/network/interfaces file:

auto lo
iface lo inet loopback
source /etc/network/interfaces.d/*.cfg


ls /etc/network/interfaces.d/
eth0.cfg

And here's what I have in /etc/network/interfaces.d/eth0.cfg

# The primary network interface
auto eth0
iface eth0 inet dhcp

Additionally I get these errors:

ubuntu@anmol-vm1-new:/home/hadoop/yarnpp/workloads/RESULTS$ tc qdisc change dev eth0 root netem delay 100ms
RTNETLINK answers: Operation not permitted
ubuntu@anmol-vm1-new:/home/hadoop/yarnpp/workloads/RESULTS$ sudo tc qdisc change dev eth0 root netem delay 100ms
RTNETLINK answers: Invalid argument

In reference you might also want to look at this StackOverflow question I had asked for limiting the bandwidth.

ifconfig -a
eth0      Link encap:Ethernet  HWaddr fa:16:3e:b4:22:7c  
          inet addr:10.0.1.190  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:feb4:227c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1454  Metric:1
          RX packets:603022138 errors:0 dropped:0 overruns:0 frame:0
          TX packets:132788011 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:633486216278 (633.4 GB)  TX bytes:798520828666 (798.5 GB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:367293839 errors:0 dropped:0 overruns:0 frame:0
          TX packets:367293839 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:547056723183 (547.0 GB)  TX bytes:547056723183 (547.0 GB)
2

The solution was the following:

sudo tc qdisc del dev eth0 root
sudo tc qdisc add dev eth0 root netem delay 100ms
| improve this answer | |
2

shorter solution:

sudo tc qdisc replace dev eth0 root netem delay 100ms
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.