[LARTC] Help:how to filter PPP LCP packets?

2004-08-17 Thread swcims
Hi all,
I am using tc htb3.6 on Linux2.4.17,and it works well.I'd like to capture PPP 
LCP packets and put them into high priority queue.But I don't know how to use u32 
,iptables or other methods to filter this type packet.
Would anyone please provide suggstion?Thank you very much!



  Best Regards

swcims
[EMAIL PROTECTED]
  2004-08-18



___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] QOS inquiry:WFQ?HTB?DRR?

2004-08-03 Thread swcims
Hi,
I used HTB3.6 on Linux to control traffic.It seems that HTB uses DRR(Dificit 
Round-Robin) algorithm.I heard that it is difficult for DRR  to get a delay bounded 
and WFQ is better than DRR.Is that right?So,how to implement WFQ in Linux?
Thanks a lot!

  Best Regards

swcims
[EMAIL PROTECTED]
  2004-08-03


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Urgen Help:Kernel crashed in HTB.

2004-08-01 Thread swcims
Hi,All
  I patched htb3.6 to mips liunx 2.4.17.But when I run htb,the mips linux box will 
say:
 "Unhandled kernel unaligned access in unaligned.c:emulate_load_store_insn, line 
346".Then the kernel crashed .
Would anyone like to tell me how to solve this problem?Thank you very much!


  Best Regards

swcims
[EMAIL PROTECTED]
  2004-08-02


[LARTC] Help:how many bandwidth are borrowed in HTB?How to caculate!

2004-07-29 Thread swcims
Hi,All
I use HTB to control traffic.Here is my script:

/usr/sbin/tc qdisc del dev nas0 root
/usr/sbin/tc qdisc add dev nas0 root handle 1:0 htb default 60
/usr/sbin/tc class add dev nas0 parent 1:0 classid 1:1 htb ceil 896kbit rate 
896kbit prio 0 burst 60k
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:10 htb ceil 896kbit rate 
537kbit prio 1 burst 60k
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:20 htb ceil 361kbit rate 
161kbit prio 2 burst 60k
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:30 htb ceil 298kbit rate 
98kbit prio 3 burst 60k
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:40 htb ceil 271kbit rate 
71kbit prio 4 burst 60k
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:50 htb ceil 117kbit rate 
17kbit prio 5 burst 60k
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:60 htb ceil 212kbit rate 
12kbit prio 6 burst 60k

 Attach SFQ to each class #
/usr/sbin/tc qdisc add dev nas0 parent 1:10 handle 10: sfq perturb 10
/usr/sbin/tc qdisc add dev nas0 parent 1:20 handle 20: sfq perturb 10
/usr/sbin/tc qdisc add dev nas0 parent 1:30 handle 30: sfq perturb 10
/usr/sbin/tc qdisc add dev nas0 parent 1:40 handle 40: sfq perturb 10
/usr/sbin/tc qdisc add dev nas0 parent 1:50 handle 50: sfq perturb 10
/usr/sbin/tc qdisc add dev nas0 parent 1:60 handle 60: sfq perturb 10

##Filters#

/usr/sbin/tc filter add dev nas0 parent 1:0 protocol ip prio 1 u32 match ip 
sport 20 0x flowid 1:10
/usr/sbin/tc filter add dev nas0 parent 1:0 protocol ip prio 1 u32 match ip 
dport 20 0x flowid 1:10
/usr/sbin/tc filter add dev nas0 parent 1:0 protocol ip prio 3 u32 match ip 
sport 8000 0x flowid 1:30
/usr/sbin/tc filter add dev nas0 parent 1:0 protocol ip prio 3 u32 match ip 
dport 8000 0x flowid 1:30

Then,I use "ftp 21" and "ftp 8001" to test this script,which according to 
class 1:10 and class 1:30.I found that the class 1:30 will get more bandwidth than 
class 1:10.I got confused!You know,class can borrow more available bandwidth.But I 
don't know why the low priority (1:30) can borrow more bandwidth than high 
priority(1:10)?
Would anyone like to tell me how HTB caculate borrowed bandwidth?
Any suggestion will be highly appreciated!

  Best Regards

swcims
[EMAIL PROTECTED]
  2004-07-30


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Help:how to schedule P bits traffic?

2004-06-24 Thread swcims
Hi,All
I would like to implement this function on mipsel-linux box by using 
iproute2/tc:
"The device MUST recognize and schedule traffice that makes use of the P bits 
as defined in IEEE802.1p".
Would anyone please supply some suggestion?In order to "recognize" the P bits 
traffice,should I need to set vlan on device?
Any advice is highly appreciated!

  Best regards.
    

swcims
[EMAIL PROTECTED]
  2004-06-25


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Help:how to filter P bits and schedule??

2004-06-20 Thread swcims
Hi,All
I'd like to implement the function of "recognize and schedule traffic that 
makes use of the P bit as defined in IEEE 802.1P" by iproute2/tc in mips linux 
device.I think I should use iptables or u32 filter to recognize P bits of traffic and 
then put them into different queues(classes).But how to do this filter function by 
iptables or u32?
Any suggestion is highly appreciated!Thanks.



  Best regards.
    

swcims
[EMAIL PROTECTED]
  2004-06-21


[LARTC] Help:how to generate different packets?souce code explanation?

2004-06-17 Thread swcims
Hi,All
I setup traffic control configuration with HTB this way:

1: root HTB qdisc
 |
1:1 HTB class  rate 1024kbit
 |
 /-+-+-+--+-\
1:10  1:20  1:30  1:40   1:501:60
EFAF41   AF31  AF21   AF11   BE

 and alloct different bandwidth to these PHBs(queues).So which tool would I use to 
generate these packets at the same to for testing?Thank you!
Another question:I am studying sch_htb.c,but it's so tough for to 
understand,especially htb_dequeue().Would anyone please supply some adivse?
Thank you very much!


  Best regards.


    swcims
[EMAIL PROTECTED]
  2004-06-18


[LARTC] can use iptables to match 802.1Q P bits?

2004-06-09 Thread swcims
Hi,All
I'd like to use iptables to set TOS according to the 802.1Q P bits in ethernet 
header,but I got no idea.You know,we can use this to match mac:iptables -A FORWARD -m 
mac --mac-source 00:e0:4c:3b:b6:d5 -j DROP.So can iptables supply commands to match P 
bits in ethernet header?(If so,I can set:iptables -A FORWARD -p pbits --pbits 0x5 -j 
TOS --set-tos 0xb8.)
Any suggestion is highly appreciated!




  Best regards.


    swcims
[EMAIL PROTECTED]
  2004-06-10


Re: Re: [LARTC] how to realize "MLPPP LFI" on linux

2004-06-01 Thread swcims
Hi,Andy 
Thank you for your reply.
Where is the "Documents/ppp-generic.txt" mentioned in your letter?I'd like to 
have look and find some clues.
In TR059,it requires to implement such a mechanism as MLPPP LFI.I think the 
essence is LFI,which do fragmentation and  interleaving.This method will reduce the 
delay of EF packets such as voip packets.So,in my viewpoint,two phases would be done 
on linux kernel or linux iproute2:
1.fragments the BE and AF packets if they are bigger than specific size.
2.put the following EF packets into the middle of these new fragmented packets.
But It's so taugh for my current knowledge to implement these,especially phase 
2.Even I can't find which place in linux kernel or iproute2 I would do these .
What's your opinion?Any suggestion is highly appreciated!
Thank you very much!



=== 2004-06-02 06:48:50 You wrote:===

>swcims wrote:
>> Hi,Andy Thank your very much! For the MLPPP LFI,I found that in Cisco
>> configuration,it use "ppp multilink;ppp multilink fragmentation;ppp
>> multilink fragment-delay 20;ppp multilink interleave " command to
>> enable MLPPP LFI.So I think just realizing the same function on my
>> linux router would be fine.But I got no idea how to do this on
>> linux.So is there anything with iproute2?Would you please supply some
>> suggestions? As for "The packet size threshold before fragmenting AF
>> and BE packets MUST be configurable", I am completely lost.Any advise
>> is highly appreciated! Thank you again!
>
>I found the TR059 Doc - but haven't read properly yet.
>
>Grepping my sources - linux mlppp is mentioned in
>Documents/ppp-generic.txt - it chooses frag size and expects > 1 line,
>as I expect the Cisco does, unless it has other Qos settings the fact it
>has settings for delay/frag etc. probably has nothing to do with TR059.
>
>In the Doc MLPPP is used as an example of how to fragment - more work is
>needed to actually use it for QOS on one link.
>
>Andy.
>
>
>> 
>> 
>> 
>> 
>> === 2004-05-30 15:29:20 You wrote:===
>> 
>> 
>>> swcims wrote:
>>> 
>>>> Hi,Andy I don't understand what you mean.I have a adsl router
>>>> based on mips linux2.4.17.In this adsl router,one side is 100Mbit
>>>> ethernet card,another side is adsl line,as following: 
>>>> LAN--(ethernet)ADSL Router--(ADSL
>>>> line)-WAN On this adsl line,it can configue
>>>> rfc1483bridge or router,or pppoe to get wan ip from ISP. I think
>>>> this side(upstream) is the bottleneck link. I ported iproute2/tc
>>>> on this router and i can control traffice on the upstream line. 
>>>> But I got completely no idea for doing these: (from TR059
>>>> Technical Report DSL Forum) 1.The device MUST support the
>>>> capability to fragment AF and BE traffic in order to constrain
>>>> the perturbing impact of AF and BE packets on EF traffic delay,
>>>> for example using a mechanism such as MLPPP LFI.(RFC1990) 2. The
>>>> packet size threshold before fragmenting AF and BE packets MUST
>>>> be configurable. Thank you very much!
>>> 
>>> What I mean is that if you want to mess around with packets below
>>> ip level, the other end  - your ISP/teleco , will need to be
>>> running software that knows what you are doing so that it can
>>> reconstruct the packets before routing.
>>> 
>>> If you have a specific need for your upstream not to be delayed
>>> more than X ms you could adjust your MTUs/MSS clamp - the size will
>>> depend on your bitrate and max delay required.
>>> 
>>> Andy.
>>> 
>>> 
>>> 
>> 
>> 
>> = = = = = = = = = = = = = = = = = = = = 
>> 
>>   Regards.
>> 
>>  swcims [EMAIL PROTECTED]   2004-05-31
>> 

= = = = = = = = = = = = = = = = = = = =


  Regards.
 
 
swcims
[EMAIL PROTECTED]
  2004-06-02



Re: Re: [LARTC] how to realize "MLPPP LFI" on linux

2004-05-30 Thread swcims
Hi,Andy
Thank your very much!
For the MLPPP LFI,I found that in Cisco configuration,it use "ppp 
multilink;ppp multilink fragmentation;ppp multilink fragment-delay 20;ppp multilink 
interleave " command to enable MLPPP LFI.So I think just realizing the same function 
on my linux router would be fine.But I got no idea how to do this on linux.So is there 
anything with iproute2?Would you please supply some suggestions?
As for "The packet size threshold before fragmenting AF and BE packets MUST be 
configurable", I am completely lost.Any advise is highly appreciated!
Thank you again!




=== 2004-05-30 15:29:20 You wrote:===

>swcims wrote:
>> Hi,Andy
>>  I don't understand what you mean.I have a adsl router based on mips 
>> linux2.4.17.In this adsl router,one side is 100Mbit ethernet card,another side is 
>> adsl line,as following:
>>  LAN--(ethernet)ADSL Router--(ADSL line)-WAN
>>  On this adsl line,it can configue rfc1483bridge or router,or pppoe to get wan 
>> ip from ISP. I think this side(upstream) is the bottleneck link. I ported 
>> iproute2/tc on this router and i can control traffice on the upstream line.
>>  But I got completely no idea for doing these: (from TR059 Technical Report DSL 
>> Forum)
>>  1.The device MUST support the capability to fragment AF and BE traffic in 
>> order to constrain the perturbing impact of AF and BE packets on EF traffic delay, 
>> for example using a mechanism such as MLPPP LFI.(RFC1990)
>>  2. The packet size threshold before fragmenting AF and BE packets MUST be 
>> configurable. 
>>  Thank you very much!
>
>What I mean is that if you want to mess around with packets below ip
>level, the other end  - your ISP/teleco , will need to be running
>software that knows what you are doing so that it can  reconstruct the
>packets before routing.
>
>If you have a specific need for your upstream not to be delayed more
>than X ms you could adjust your MTUs/MSS clamp - the size will depend on
>your bitrate and max delay required.
>
>Andy.
>
>
>

= = = = = = = = = = = = = = = = = = = =


  Regards.
 
 
swcims
[EMAIL PROTECTED]
  2004-05-31



Re: Re: [LARTC] how to realize "MLPPP LFI"

2004-05-28 Thread swcims
Hi,Andy
I don't understand what you mean.I have a adsl router based on mips 
linux2.4.17.In this adsl router,one side is 100Mbit ethernet card,another side is adsl 
line,as following:
LAN--(ethernet)ADSL Router--(ADSL line)-WAN
On this adsl line,it can configue rfc1483bridge or router,or pppoe to get wan 
ip from ISP. I think this side(upstream) is the bottleneck link. I ported iproute2/tc 
on this router and i can control traffice on the upstream line.
But I got completely no idea for doing these: (from TR059 Technical Report DSL 
Forum)
1.The device MUST support the capability to fragment AF and BE traffic in 
order to constrain the perturbing impact of AF and BE packets on EF traffic delay, for 
example using a mechanism such as MLPPP LFI.(RFC1990)
2. The packet size threshold before fragmenting AF and BE packets MUST be 
configurable. 
Thank you very much!

   
 

=== 2004-05-29 02:57:48 You wrote:===

>swcims wrote:
>> Hi,all
>>  I am using iproute2/tc to manage bandwidth and control traffic.I must realize 
>> these two tricky functions in mips linux(kernel 2.4.17):
>>  1.The device MUST support the capability to fragment AF and BE traffic in 
>> order to constrain the perturbing impact of AF and BE packets on EF traffic delay, 
>> for example using a mechanism such as MLPPP LFI.(RFC1990)
>>  2. The packet size threshold before fragmenting AF and BE packets MUST be 
>> configurable. 
>>  I am completely stunned.I think these functions are about qos,and I heard that 
>> Cisco realize MLPPP LFI in its qos function.
>>  Would anyone please supply some suggestion?Thank you very much!
>
>Do you have control of both ends of the bottleneck link?
>
>Andy.
>
>
>
>___
>LARTC mailing list / [EMAIL PROTECTED]
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>

= = = = = = = = = = = = = = = = = = = =


  Regards.
 
 
swcims
[EMAIL PROTECTED]
  2004-05-29

,S
f?)?+-?L)?Y??jya囤??f)fj??s?r?

[LARTC] how to realize "MLPPP LFI"

2004-05-26 Thread swcims
Hi,all
I am using iproute2/tc to manage bandwidth and control traffic.I must realize 
these two tricky functions in mips linux(kernel 2.4.17):
1.The device MUST support the capability to fragment AF and BE traffic in 
order to constrain the perturbing impact of AF and BE packets on EF traffic delay, for 
example using a mechanism such as MLPPP LFI.(RFC1990)
2. The packet size threshold before fragmenting AF and BE packets MUST be 
configurable. 
I am completely stunned.I think these functions are about qos,and I heard that 
Cisco realize MLPPP LFI in its qos function.
Would anyone please supply some suggestion?Thank you very much!




  Regards.


swcims
[EMAIL PROTECTED]
  2004-05-26


[LARTC] how to realize "MLPPP LFI"

2004-05-25 Thread swcims
Hi,all
I am using iproute2/tc to manage bandwidth and control traffic.I must realize 
these two tricky functions in mips linux(kernel 2.4.17):
1.The device MUST support the capability to fragment AF and BE traffic in 
order to constrain the perturbing impact of AF and BE packets on EF traffic delay, for 
example using a mechanism such as MLPPP LFI.(RFC1990)
2. The packet size threshold before fragmenting AF and BE packets MUST be 
configurable. 
I am completely stunned.I think these functions are about qos,and I heard that 
Cisco realize MLPPP LFI in its qos function.
Would anyone please supply some suggestion?Thank you very much!




  Regards.


swcims
[EMAIL PROTECTED]
  2004-05-26


[LARTC] how to borrow bandwith

2004-05-24 Thread swcims
Hi,All
I am using iproute2 to manage bandwith for ADSL router.High,medium,low 
priority are needed for different protocol port on the ADSL's upstream side,as 
following:
LAN --- |ADSL Router|--WAN
   When there aren't traffic on the specific priority, its bandwidth should be 
borrowed by other priorities.But it doesn't work.Here is my script:

/usr/sbin/tc qdisc del dev nas0 root
/usr/sbin/tc qdisc del dev br0 root
/usr/sbin/tc qdisc add dev nas0 root handle 1:0 cbq bandwidth 1024kbit avpkt 
1000 cell 8
/usr/sbin/tc class add dev nas0 parent 1:0 classid 1:1 cbq bandwidth 1024kbit 
rate 1024kbit weight 1024kbit prio 0 allot 1514 cell 8 maxburst 20 avpkt 1000 isolated 
bounded
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:2 cbq bandwidth 1024kbit 
rate 611kbit weight 611kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000 
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:3 cbq bandwidth 1024kbit 
rate 305kbit weight 305kbit prio 3 allot 1514 cell 8 maxburst 20 avpkt 1000
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:4 cbq bandwidth 1024kbit 
rate 103kbit weight 103kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 
/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:5 cbq bandwidth 1024kbit 
rate 5kbit weight 5kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

class 1:1 is root class;class 1:2 is for high priority;class 1:3 is for  
medium priority,class 1:4 is for low priority,class 1:5 is for other traffic.When I 
use "bounded" in subclass 1:2,1:3,1:4,1:5,each rate can be assured in each class,but 
can't borrow.When I use "isolated" in every subclass,the result isn't expected.
How should I do for "when no traffic on the specific priority,its bandwidth 
can be borrowed by other traffic"? Thank you very much!
 

  Regards.


     
   swcims
    
 [EMAIL PROTECTED]
  
  2004-05-25