From: Nataniel Klug <nata@cnett.com.br>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Matching interface using U32(?)
Date: Tue, 09 May 2006 11:11:31 +0000 [thread overview]
Message-ID: <446078E3.8070008@cnett.com.br> (raw)
In-Reply-To: <445B5F2C.604@cnett.com.br>
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
prev parent reply other threads:[~2006-05-09 11:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=446078E3.8070008@cnett.com.br \
--to=nata@cnett.com.br \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox