[LARTC] no default leaf on HTB

Linux Advanced Routing and Traffic Control

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

 



Hello,

I have a linux bridge setup and am using HTB to bandwidth manage traffic 
passing through the bridge.
I want to manage "some" of the traffic passing through the bridge. I 
figured I can do this if I dont define a "default" class on the qdisc.
I will only config classes for traffic I want to manage.

Assume that i Have traffic for network 10.0.0.0/24 passing through the 
bridge.
I only want to manage traffic for network 10.0.0.0/29 and 10.0.0.8/29 and 
not manage the rest of the traffic for the /24

Here is my script:


###START OF SCRIPT###
#create the qdisc
tc qdisc add dev eth1 root handle 1: htb default 30
tc class add dev eth1 parent 1: classid 1:1 htb rate 608kbit ceil 608kbit prio 1

#create class for 10.0.0.0/29
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 256kbit ceil \
608kbit prio 3
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip \
dst 10.0.0.0/29  flowid 1:10
tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10

#create class for 10.0.0.8/29
tc class add dev eth1 parent 1:1 classid 1:20 htb rate 352kbit ceil \
608kbit prio 3
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip \
dst 10.0.0.8/29  flowid 1:20
tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10

##Default class is commented
#Create default class
#$CLASS 1:30 htb rate 300kbit ceil 300kbit prio 1
#$QUEUE 1:30 handle 30: sfq perturb 10


##END of SCRIPT##

Ran the script with no errors. Will i be able to achieve setup that I 
want? How will htb traffic no being classified since there is no default 
class?

Thanks.
Paul P.





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