[Netem] some questions about netem

Miao Wang wangmiaozjlljr at gmail.com
Thu Oct 7 20:11:48 PDT 2010


Dear professors,
   I am a student from China. I have some questions about netem settings and
need your help.
   I want to simulate LAN on WAN, so I need to add netem delay to the data
transmission. But when I set netem, the data transmission rate becomes low,
and a lot of packets dropped. I want to know if this is due to netem?
   Now I tell you how I set the tc and netem. I have 3 severs, the 1st is
the data sender, the 3rd is the data receiver, and I set netem delay on the
2nd server. The data from 1st server to 3rd server must go through 2nd
server.
  the shell script on 2nd server is at the attached files.
  Thank you very much.
  Best wishes!


  Miao
  Renmin Uni. of China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20101008/bdbd52f9/attachment.htm 
-------------- next part --------------
#!/bin/sh

tc qdisc add dev eth1 root handle 1: htb default 13
tc class add dev eth1 parent 1:0 classid 1:1 htb rate 1000Mbit burst 500mb cburst 500mb quantum 1000000000

tc class add dev eth1 parent 1:1 classid 1:11 htb rate 1000Mbit burst 400mb cburst 400mb prio 1 quantum 100000000
tc qdisc add dev eth1 parent 1:11 handle 11: netem delay 0ms limit 200000
tc qdisc add dev eth1 parent 11:0 handle 111: sfq
tc filter add dev eth1 parent 1: prio 1 protocol ip u32 match ip dst 10.141.7.166/32 match ip src 10.141.7.165/32 flowid 1:11

tc class add dev eth1 parent 1:1 classid 1:12 htb rate 1000Mbit burst 150mb cburst 150mb prio 2 quantum 100000000
tc qdisc add dev eth1 parent 1:12 handle 12: netem delay 0ms limit 200000
tc qdisc add dev eth1 parent 12:0 handle 122: sfq
tc filter add dev eth1 parent 1: prio 1 protocol ip u32 match ip dst 10.141.7.165/32 match ip src 10.141.7.166/32 flowid 1:12

tc class add dev eth1 parent 1:1 classid 1:13 htb rate 50Mbit burst 20mb cburst 20mb ceil 50Mbit prio 3 quantum 100000000


More information about the Netem mailing list