From: Kasp Date: Fri, 19 Nov 2004 02:47:36 +0000 Subject: [LARTC] mixing u32 and fwmark Message-Id: <1100832456.419d5ec8771fc@www1.inbox.lv> MIME-Version: 1 Content-Type: multipart/mixed; boundary="-moq110083245619cd2b5d4dc932b5fef4e383bf0df1f3" List-Id: To: lartc@vger.kernel.org ---moq110083245619cd2b5d4dc932b5fef4e383bf0df1f3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Hi! There is one thing I can't do. In my country we have to pay for "foreign" internet. Local internet is cheap and fast, but foreign is slow and expensive. So I want do following: mark every packet with iptables, where --set-mark 1 for foreign internet, but --set-mark 2 for local internet next when I got all traffic marking, I need to assign traffic to users so I make classes, like: tc qdisc add dev eth1 root handle 1: htb tc class add dev eth1 parent 1: classid 1:1 htb rate 900kbps ceil 900kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 30kbps ceil 500kbps tc class add dev eth1 parent 1:10 classid 1:11 htb rate 10kbps ceil 10kbps tc class add dev eth1 parent 1:10 classid 1:12 htb rate 30kbps ceil 50kbps .... and now I have very big problem! How do I assign certain speed for certain IP (and also looking is it local or foreign internet) If I just set: tc filter add dev eth1 parent 1: protocol ip prio 4 handle 0x1 fw classid 1:11 then it will affect all my users, but I need set this to each user individually (each class) just to get sure, every user gets certain speed. Actually it seems, I need to combine fwmark with u32 classifier or something. What do you sugest to do? I can't find a solution for my problem. Advertisement: Atrodiet savu celojumu seit! http://travel.inbox.lv ---moq110083245619cd2b5d4dc932b5fef4e383bf0df1f3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit
Hi!

There is one thing I can't do. In my country we have to pay for
"foreign" internet. Local internet is cheap and fast, but foreign is
slow and expensive. So I want do following:

mark every packet with iptables, where --set-mark 1 for foreign
internet, but --set-mark 2 for local internet
next when I got all traffic marking, I need to assign traffic to users
so I make classes, like:

tc qdisc add dev eth1 root handle 1: htb
tc class add dev eth1 parent 1: classid 1:1 htb rate 900kbps ceil 900kbps      
                                                    
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 30kbps ceil 500kbps     
                                                    
tc class add dev eth1 parent 1:10 classid 1:11 htb rate 10kbps ceil 10kbps     
                                                    
tc class add dev eth1 parent 1:10 classid 1:12 htb rate 30kbps ceil 50kbps
....

and now I have very big problem! How do I assign certain speed for
certain IP (and also looking is it local or foreign internet)

If I just set:
tc filter add dev eth1 parent 1: protocol ip prio 4 handle 0x1 fw classid 1:11

then it will affect all my users, but I need set this to each user
individually (each class) just to get sure, every user gets certain speed.

Actually it seems, I need to combine fwmark with u32 classifier or
something.
What do you sugest to do? I can't find a solution for my problem.

__________
Advertisement:

Atrodiet savu celojumu seit!
---moq110083245619cd2b5d4dc932b5fef4e383bf0df1f3-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/