Re: Matching interface using U32(?)

Linux Advanced Routing and Traffic Control

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

 



Nataniel Klug wrote:
   Hello all,

I am trying to make a little bit more complex QoS/Shapping form and I need to shape a PPPoE conection that I serve to my clients. So this is the scope:

client connects using pppoe so it gets an IP address (from pppoe pool) and open an interface into my linux box
interface for this client is ppp0
client has got an ip 1.1.1.2/32 and it is poiting to pppoe-server 1.1.1.1

So, if i want to shape download for this client its really easy and I make a htb rule that shapes all traffic into ppp0... My problem is when I have to shape upload traffic. All my traffic goes for eth0 to the world. I tryed to make this rule:

$TC class add dev eth0 parent 1:1 classid 1:500 htb rate 200Kbit ceil 200Kbit $TC filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip src 1.1.1.2/32 flowid 1:500

protocol ip on the filter is the problem - Without trying I am not sure what will work but in the case of vlans you can just sat protocol 8021q.

If pppoe doesn't work try its' ethertype number - you could also use protocol all and match the ethertype protocol number with u32 and a negative offset.


But this rule is not matching the upload connection. If i put the same rule to an IP (i set an ip into client) this rule works but into pppoe conection it did not work properly.

Someone has some tip to match the interface that the conection is coming from? Like I wanna match all traffic coming from ppp0 and going throw eth0 to be shapped?! There is anyway to make this work?

If you are running >2.6.16 then you could use IFB and attach a queue to each ppp.

There is a kernel config option for u32 to mach indev - I don't know the syntax,though.

Andy.

_______________________________________________
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