2

I have a VPS running Ubuntu 10.04 that I want to simulate network latency on. It looks like tc is what I want to use, and I pulled this command from the examples from here: http://www.linuxfoundation.org/collaborate/workgroups/networking/netem

# tc qdisc add dev eth0 root netem delay 100ms

If I run this command, I get this error message:

$ sudo tc qdisc add dev eth0 root netem delay 100ms
RTNETLINK answers: No such file or directory

I suspect that I might be missing whatever makes this command work. Searching lead me to believe that there might be kernel modules needed, but I couldn't be sure. I ran lsmod on the machine and it comes up empty.

So, I'm lost. How can I get my simulation working?

2 Answers 2

1

To check if the netem module is indeed installed run:

modinfo sch_netem

You should see info about where it is installed and other details. If you get and error like "modinfo: ERROR: Module sch_netem not found." then it's probably not installed unless you just installed it and the current running kernel is different from the kernel for which you installed it - in which case just reboot and it should show up.

On some Linux distributions netem appears to be installed as part of the normal install (e.g. Ubuntu-20), but on others you need to install it as part of an extra package e.g. for Centos

sudo yum install kernel-modules-extra
0

It's quite normal for a VPS image to be missing things found in a "regular" install, such as the many commands that are normally not required in such an environment. If you want something that's not there go through the normal install process.

2
  • Sounds reasonable. What is missing that I need to install, or, how can I find out? The link I found seems to be the main resource for this component but I see what it depends on. Oct 6, 2011 at 17:39
  • @phasetwenty, as I don't use Ubuntu or tc I'll leave it to someone familiar with that distro to go over the install procedure. Oct 6, 2011 at 20:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .