All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Matching interface using U32(?)
@ 2006-05-05 14:20 Nataniel Klug
  2006-05-07 19:18 ` Andy Furniss
  2006-05-09 11:11 ` Nataniel Klug
  0 siblings, 2 replies; 3+ messages in thread
From: Nataniel Klug @ 2006-05-05 14:20 UTC (permalink / raw)
  To: lartc

    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

    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?

Att,

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] Matching interface using U32(?)
  2006-05-05 14:20 [LARTC] Matching interface using U32(?) Nataniel Klug
@ 2006-05-07 19:18 ` Andy Furniss
  2006-05-09 11:11 ` Nataniel Klug
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Furniss @ 2006-05-07 19:18 UTC (permalink / raw)
  To: lartc

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@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] Matching interface using U32(?)
  2006-05-05 14:20 [LARTC] Matching interface using U32(?) Nataniel Klug
  2006-05-07 19:18 ` Andy Furniss
@ 2006-05-09 11:11 ` Nataniel Klug
  1 sibling, 0 replies; 3+ messages in thread
From: Nataniel Klug @ 2006-05-09 11:11 UTC (permalink / raw)
  To: lartc

Andy

I make it work using iptables mark... I just had to change some parts of 
the script and it is, now, working fine.

Att,

Nataniel Klug

Andy Furniss escreveu:
> 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@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-09 11:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-05 14:20 [LARTC] Matching interface using U32(?) Nataniel Klug
2006-05-07 19:18 ` Andy Furniss
2006-05-09 11:11 ` Nataniel Klug

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.