From madghost, 3 Months ago, written in Plain Text.
This paste is a reply to Re: tc filter match dosn't work from madghost - view diff
  1. local network 172.31.99.0/24 my computer 172.31.99.2/32
  2. Scheme: LAN -> eth0 -> Linux server -> eth1 -> Internet
  3.  
  4.  
  5. tc qdisc add dev eth0 root handle 1: htb default 100
  6. tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit
  7.  
  8. tc class add dev eth0 parent 1:1 classid 1:100 htb rate 1mbit
  9. tc class add dev eth0 parent 1:1 classid 1:2 htb rate 10mbit
  10.  
  11. tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 172.31.99.0/24 flowid 1:2
  12.  
  13. tc -s class ls dev eth0
  14.  
  15. no traffic on class 1:2 why ?
  16.  
  17. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  18.  tc -s class ls dev eth0
  19. class htb 1:100 parent 1:1 prio rate 1Mbit ceil 1Mbit burst 1600b cburst 1600b
  20.  Sent 758278 bytes 1067 pkt (dropped 0, overlimits 513 requeues 0)
  21.  backlog 69854b 48p requeues 0
  22.  lended: 1067 borrowed: 0 giants: 0
  23.  tokens: -189113 ctokens: -189113
  24.  
  25. class htb 1:1 root rate 100Mbit ceil 100Mbit burst 1600b cburst 1600b
  26.  Sent 758278 bytes 1067 pkt (dropped 0, overlimits 3 requeues 0)
  27.  backlog 0b 0p requeues 0
  28.  lended: 0 borrowed: 0 giants: 0
  29.  tokens: 107 ctokens: 107
  30.  
  31. class htb 1:2 parent 1:1 prio rate 10Mbit ceil 10Mbit burst 1600b cburst 1600b
  32.  Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
  33.  backlog 0b 0p requeues 0
  34.  lended: 0 borrowed: 0 giants: 0
  35.  tokens: 20000 ctokens: 20000
  36.  
captcha