How to tc filter with NETEM?

前端 未结 1 1946
忘了有多久
忘了有多久 2021-02-11 05:25

I need some help directing netem delays to a specific IP. I have inputted all the commands correctly with no errors and as shown in the pictures attached. I have no latency bein

1条回答
  •  隐瞒了意图╮
    2021-02-11 05:31

    tc qdisc del dev eth0 root
    tc qdisc add dev eth0 root handle 1: htb
    tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit
    tc filter add dev eth0 parent 1: protocol ip prio 1 u32 flowid 1:1 match ip dst 192.168.2.219
    tc qdisc add dev eth0 parent 1:1 handle 10: netem delay 25ms 5ms
    
    • PS: by adding 5ms jitter to delay, you also create packet reordering in the network. Assuming that this is what you want.
    • PPS: I am not sure whether adding jitter creates reordering or not in OpenWRT. But it surely does in the Linux kernel. Netem has undergone umpteen number of changes since 2010.
    • PPPS: To introduce jitter w/o packet reordering, set a very high rate limit.

      tc qdisc add dev eth0 parent 1:1 handle 10: rate 1000 mbit netem delay 25ms 5ms
      

    0 讨论(0)
提交回复
热议问题