new to TC need help

Linux Advanced Routing and Traffic Control

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

 



Hello,

I am new to TC and need some help with something that I need to do
I have the following setup which works just fine but with a little problem.
I need the user 172.16.1.100 in the case that it is using both classes never to exceed 256kbit
now it goes up to 512kbit because both classes offer 256 each.
How can I finally restrict this user to only 256kbit no matter what.
====================================================================================
# Initial Classes (Default)

tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 30 # root qdisk
tc class add dev eth1 parent 1: classid 1:1 htb rate 10240kbit ceil 10240kbit # Child class
#
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 2048kbit ceil 3072kbit prio 1 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 128kbit ceil 512kbit prio 2 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 100kbit ceil 512kbit prio 3
tc class add dev eth1 parent 1:1 classid 1:50 htb rate 5120kbit ceil 6144kbit
#
tc qdisc add dev eth1 parent 1:10 handle 10: htb # Premium Class
tc qdisc add dev eth1 parent 1:20 handle 20: htb
tc qdisc add dev eth1 parent 1:30 handle 30: htb
tc qdisc add dev eth1 parent 1:50 handle 50: htb # Local Traffic

# Per User Configuration
# User 172.16.1.100
tc class add dev eth1 parent 10:0 classid 10:100 htb rate 256kbit
tc class add dev eth1 parent 50:0 classid 50:100 htb rate 256kbit
tc filter add dev eth1 protocol ip parent 1:0 u32 match ip dst 172.16.1.100/32 classid 1:10 tc filter add dev eth1 protocol ip parent 10:0 u32 match ip dst 172.16.1.100/32 classid 10:100 tc filter add dev eth1 protocol ip parent 1:0 u32 match ip src 194.154.159.84/32 match ip dst 172.16.1.100/32 flowid 1:50 tc filter add dev eth1 protocol ip parent 50:0 u32 match ip src 194.154.159.84/32 match ip dst 172.16.1.100/32 flowid 50:100
#
============================================================================================

Thank you in advance

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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