Skip to contentSkip to conversation

Enable netem in my Linux box

DISCUSSION Koon Wah Yick 2 participants 7 messages May 9, 2007 – May 10, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi:

My Linux box has CentOS5 installed. But I could not run tc command with any netem parameters in command line. as shown in web site
http://linux-net.osdl.org/index.php/Netem. I suspect, Netem was either not part of the installed OS or has not been enabled. Can you tell how to verified? When I type in "rpm -qa" I see only iproute-2.6.18-4.el5, do I need iproute2? Can you tell me how to update my Linux kernel to include netem functionality. Thanks,

Koon-Wah.

#1 lore raw
Quoted 10 lines · On Wed, 09 May 2007 11:31:17 -0400 Koon Wah Yick <[email protected]>…

Hi:

My Linux box has CentOS5 installed. But I could not run tc command with any netem parameters in command line. as shown in web site
http://linux-net.osdl.org/index.php/Netem. I suspect, Netem was either not part of the installed OS or has not been enabled. Can you tell how to verified? When I type in "rpm -qa" I see only iproute-2.6.18-4.el5, do I need iproute2? Can you tell me how to update my Linux kernel to include netem functionality. Thanks,

Quoted 7 lines

Koon-Wah.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

modinfo sch_netem

Signature · 1 line
Stephen Hemminger <[email protected]>
#2 lore raw

Stephen:

Thank you for your response, I type in modinfo sch_netem

Here is what I got:

filename: /lib/modules/2.6.11-1.1369_FC4/kernel/net/sched/sch_netem.ko
license: GPL
vermagic: 2.6.11-1.l369_FC 686 REGPARM 4KSTACKS gcc-4.0 depends:
srcversion: BD4563861423428FF0D5918

when I try the following "tc" command with netem

Quoted 1 line

tc qdisc change dev eth0 root netem loss 0.1%

I got the error message
RTNETLINK answers: No such file or directory.

I downloaded the ipRoute2 packet, build and re-install. Nothing change, same problem. I do "make xconfig" on my current kernel, see component netem is not enable. I enable it and re-build the kernel that does not work for me as well, the new kenerl does not boot (there may be other problem in building it). Is there an easier way to enable NETEM?

Koon-Wah.

Quoted 25 lines · Stephen Hemminger
Quoted 10 lines · On Wed, 09 May 2007 11:31:17 -0400 Koon Wah Yick <[email protected]>…

Hi:

My Linux box has CentOS5 installed. But I could not run tc command with any netem parameters in command line. as shown in web site
http://linux-net.osdl.org/index.php/Netem. I suspect, Netem was either not part of the installed OS or has not been enabled. Can you tell how to verified? When I type in "rpm -qa" I see only iproute-2.6.18-4.el5, do I need iproute2? Can you tell me how to update my Linux kernel to include netem functionality. Thanks,

Quoted 7 lines

Koon-Wah.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

modinfo sch_netem

#3 lore raw
Quoted 12 lines · On Thu, 10 May 2007 12:09:46 -0400 Koon Wah Yick <[email protected]>…

Stephen:

Thank you for your response, I type in modinfo sch_netem

Here is what I got:

filename: /lib/modules/2.6.11-1.1369_FC4/kernel/net/sched/sch_netem.ko
license: GPL
vermagic: 2.6.11-1.l369_FC 686 REGPARM 4KSTACKS gcc-4.0 depends:
srcversion: BD4563861423428FF0D5918

Quoted 7 lines

when I try the following "tc" command with netem

Quoted 1 line

tc qdisc change dev eth0 root netem loss 0.1%

I got the error message
RTNETLINK answers: No such file or directory.

You want to use 'add' not 'change'.
The examples on the linux-net page are sequential, so the first one uses 'add'. Later examples, then use change to alter parameters

#4 lore raw

Stephen:

Thank you, I got it. I try the same command again with "add" and "change" they all work.(no error) But when I start my Network Emulator, how can I stop it. Do I have to delete any file I create when doing "add"? If yes, where is it?

Koon-Wah.

Quoted 29 lines · Stephen Hemminger
Quoted 12 lines · On Thu, 10 May 2007 12:09:46 -0400 Koon Wah Yick <[email protected]>…

Stephen:

Thank you for your response, I type in modinfo sch_netem

Here is what I got:

filename: /lib/modules/2.6.11-1.1369_FC4/kernel/net/sched/sch_netem.ko
license: GPL
vermagic: 2.6.11-1.l369_FC 686 REGPARM 4KSTACKS gcc-4.0 depends:
srcversion: BD4563861423428FF0D5918

Quoted 8 lines

when I try the following "tc" command with netem

Quoted 1 line

tc qdisc change dev eth0 root netem loss 0.1%

I got the error message
RTNETLINK answers: No such file or directory.

You want to use 'add' not 'change'.
The examples on the linux-net page are sequential, so the first one uses 'add'. Later examples, then use change to alter parameters

#5 lore raw
Quoted 5 lines · On Thu, 10 May 2007 14:00:40 -0400 Koon Wah Yick <[email protected]>…

Stephen:

Thank you, I got it. I try the same command again with "add" and "change" they all work.(no error) But when I start my Network Emulator, how can I stop it. Do I have to delete any file I create when doing "add"? If yes, where is it?

You probably just want to do:
tc qdisc del dev eth0 root

That restores the default qdisc (prio-fast)

Signature · 1 line
Stephen Hemminger <[email protected]>
#6 lore raw

Stephen:

Thank you. I am happy that when I issue the tc command to drop packets, I do see the effect. Is there a command I can use to show all packet count? packet send, packet received and packet drop etc... I don't seems to be able to see them by command "ifconfig".

Koon-Wah.

Quoted 16 lines · Stephen Hemminger
Quoted 5 lines · On Thu, 10 May 2007 14:00:40 -0400 Koon Wah Yick <[email protected]>…

Stephen:

Thank you, I got it. I try the same command again with "add" and "change" they all work.(no error) But when I start my Network Emulator, how can I stop it. Do I have to delete any file I create when doing "add"? If yes, where is it?

You probably just want to do:
tc qdisc del dev eth0 root

That restores the default qdisc (prio-fast)