HTB - Shaping after Filter/Class removal

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After I remove a filter, I seem to be loosing my "parents" class shaping rules that will return a filter to default after removing just the filter or both. Sorry, this is hard to say.
 
I create a Class, give it a default Class and one "special" Class with a "C"class filter. Then I remove that "special" IP filter then class. Should that IP, that is within the "C" class range, be reduced to the parent's default Class rate?
 
I will try to map the question...
 
----------------------------------------
$TC qdisc add dev eth0 root handle 1: htb default 0 r2q 100
----------------------------------------
  # Default
    $TC class add dev eth0 parent 1: classid 1:0 htb rate 100Mbit
----------------------------------------
  # 10.10.0.0/16
    $TC class add dev eth0 parent 1: classid 1:10 htb rate 100Mbit quantum 1500
        $TC filter add dev eth0 pref 1 parent 1: protocol ip u32 flowid 1:10 match ip dst 10.10.0.0/16
      $TC qdisc add dev eth0 parent 1:10 handle 10: htb default 0 r2q 100
----------------------------------------
        # Default
          $TC class add dev eth0 parent 10: classid 10:0 htb rate 100Mbit quantum 1500
----------------------------------------
        # 10.10.3.0/24 - Test
          $TC class add dev eth0 parent 10: classid 10:3 htb rate 100Mbit quantum 1500
              $TC filter add dev eth0 pref 1 parent 10: protocol ip u32 flowid 10:3 match ip dst 10.10.3.0/24
            $TC qdisc add dev eth0 parent 10:3 handle 103: htb rate 100Mbit r2q 100
----------------------------------------
              # Default
                $TC class add dev eth0 parent 103: classid 103:0 htb rate 40Kbit quantum 1500
----------------------------------------
              # Special
                $TC class add dev eth0 parent 103: classid 103:2 htb rate 768Kbit quantum 1500
                  $TC filter add dev eth0 pref 1 parent 103: protocol ip u32 flowid 103:2 match ip dst 10.10.3.199/32
----------------------------------------
 
Everything works fine until I remove the bottom filter. Then that IP goes back 2 default classes. Now if I rebuild the entire thing again, and leave out the "special" class identifier, it works. 10.10.3.199 only gets the 40Kbit.

-----------------------
Colin Vander Veen
IMNisp
Senior Engineer
http://www.imnisp.net/
-----------------------

 

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux