2 2

[alpine-devel] Quality of Service

Ilya Strelkin
Details
Message ID
<be249ad40902090148k4ec6019ue534cdb1e960372d@mail.gmail.com>
Sender timestamp
1234172899
DKIM signature
missing
Download raw message
Hi !

I am posting the alpha version of startup script to run the QoS at Alpine
router.
   This script uses iproute2 tc (traffic control) tool and has the separate
configuration file.
   The detailed documentation that discusses Quality of Service mechanisms
will be posted soon to the Documentation section of wiki.alpinelinux.org.

Technical Details:

1. Installation:

   - The attached file init-d-qos is the startup script, should be placed as
/etc/init.d/qos.
   - The attached file conf-d-qos is the configuration file; should be
placed as /etc/conf.d/qos

2. Startup:

   - Check which traffic control actions will be taken with '/etc/init.d/qos
compile'
   - Start QoS with '/etc/init.d/qos start'
   - Check status with '/etc/init.d/qos status'
   - If ok then make startup link with 'rc_add qos' or add appropriate "up"
references into /etc/network/interfaces file

3. Main Idea:

   The iproute2 tc tool is used. Setting rate about 5-10% less than real we
try to control queue at the Router side.
   A data stream is being controlled by means EGRESS shaping or/and INGRESS
policing

4. Supported Queuing Disciplines:

   At root level HTB, HFSC, PRIO queuing disciplines are supported,
      for leafs PFIFO, SFQ, RED queuing disciplines are supported

5. Supported QoS Schemes:

   EGRESS - HFSC or HTB # HFSC is good with latency control, HTB is good
with bursts control
      |
       \ Interactive (guarantee: 20%) PFIFO   # no packet reordering due to
VoIP RTP
      |
       \ Privileged  (guarantee: 50%, sharing up to 100%) PFIFO   # no
packet reordering due to RTP and IPSEC
      |
       \ Best-Effort (guarantee: 30%, sharing up to 100% if not used by
Privileged) SFQ or RED # Fair Queuing or Random Early Detection (>10mbit/sec
links)

   EGRESS - PRIO   # for variable or unknown rates
      |
       \ Interactive (guarantee: 20%) TBF # ultimate priority for
interactive traffic
      |
       \ HTB
           |
            \ Privileged  (guarantee: 50%, sharing up to 100%) PFIFO # no
packet reordering due to VoIP RTP and IPSEC
           |
            \ Best-Effort (guarantee: 30%, sharing up to 100% if not used by
Privileged) SFQ or RED # Fair Queuing or Random Early Detection (>10mbit/sec
links)

   INGRESS
      |
       \ Interactive traffic policing (20%) then CONTINUE action
      |
       \ Privileged traffic policing (50%) then CONTINUE action
      |
       \ Best-Effort traffic policing (30%) then DROP action

6. Default Schema and Traffic Classification (may be changed according to
custom needs):

   up-link - HFSC, down-link - HTB,

   Interactive (PFIFO): ACK, payload <64 bytes; ICMP, UDP, TOS: 0x10, 0x18,
0xb8
   Privileged (PFIFO): SSH, BGP, RDP, AH, ESP, TOS: 0x88
   Best-Effort (SFQ): Any other unclassified traffic


7. To do list:

   1. multiple WAN interface support
   2. code optimizations/refinements, bug fixes
   3. monitoring tools
   4. ...Any suggestions are very welcome...

Ilya S.
Natanael Copa
Details
Message ID
<1234175171.11678.37.camel@nc>
In-Reply-To
<be249ad40902090148k4ec6019ue534cdb1e960372d@mail.gmail.com> (view parent)
Sender timestamp
1234175171
DKIM signature
missing
Download raw message
On Mon, 2009-02-09 at 12:48 +0300, Ilya Strelkin wrote:
> Hi !
> 
> I am posting the alpha version of startup script to run the QoS at
> Alpine router.

way cool!

>    This script uses iproute2 tc (traffic control) tool and has the
> separate configuration file.
>    The detailed documentation that discusses Quality of Service
> mechanisms will be posted soon to the Documentation section of
> wiki.alpinelinux.org.
> 
> Technical Details:
> 
> 1. Installation:
> 
>    - The attached file init-d-qos is the startup script, should be
> placed as /etc/init.d/qos.
>    - The attached file conf-d-qos is the configuration file; should be
> placed as /etc/conf.d/qos
>  
> 2. Startup:
> 
>    - Check which traffic control actions will be taken with
> '/etc/init.d/qos compile'
>    - Start QoS with '/etc/init.d/qos start'
>    - Check status with '/etc/init.d/qos status'
>    - If ok then make startup link with 'rc_add qos' or add appropriate
> "up" references into /etc/network/interfaces file
>    
> 3. Main Idea: 
> 
>    The iproute2 tc tool is used. Setting rate about 5-10% less than
> real we try to control queue at the Router side.
>    A data stream is being controlled by means EGRESS shaping or/and
> INGRESS policing
> 
> 4. Supported Queuing Disciplines:
> 
>    At root level HTB, HFSC, PRIO queuing disciplines are supported,
>       for leafs PFIFO, SFQ, RED queuing disciplines are supported
> 
> 5. Supported QoS Schemes:
> 
>    EGRESS - HFSC or HTB # HFSC is good with latency control, HTB is
> good with bursts control
>       |
>        \ Interactive (guarantee: 20%) PFIFO   # no packet reordering
> due to VoIP RTP 
>       |
>        \ Privileged  (guarantee: 50%, sharing up to 100%) PFIFO   # no
> packet reordering due to RTP and IPSEC
>       |
>        \ Best-Effort (guarantee: 30%, sharing up to 100% if not used
> by Privileged) SFQ or RED # Fair Queuing or Random Early Detection
> (>10mbit/sec links)
> 
>    EGRESS - PRIO   # for variable or unknown rates
>       |
>        \ Interactive (guarantee: 20%) TBF # ultimate priority for
> interactive traffic
>       |
>        \ HTB
>            |
>             \ Privileged  (guarantee: 50%, sharing up to 100%) PFIFO #
> no packet reordering due to VoIP RTP and IPSEC 
>            |
>             \ Best-Effort (guarantee: 30%, sharing up to 100% if not
> used by Privileged) SFQ or RED # Fair Queuing or Random Early
> Detection (>10mbit/sec links)
> 
>    INGRESS
>       | 
>        \ Interactive traffic policing (20%) then CONTINUE action
>       | 
>        \ Privileged traffic policing (50%) then CONTINUE action
>       | 
>        \ Best-Effort traffic policing (30%) then DROP action
> 
> 6. Default Schema and Traffic Classification (may be changed according
> to custom needs):
> 
>    up-link - HFSC, down-link - HTB, 
> 
>    Interactive (PFIFO): ACK, payload <64 bytes; ICMP, UDP, TOS: 0x10,
> 0x18, 0xb8
>    Privileged (PFIFO): SSH, BGP, RDP, AH, ESP, TOS: 0x88
>    Best-Effort (SFQ): Any other unclassified traffic
> 
> 
> 7. To do list:
> 
>    1. multiple WAN interface support
>    2. code optimizations/refinements, bug fixes
>    3. monitoring tools
>    4. ...Any suggestions are very welcome...

the config looks very complicated (and even includes functions)
Would it be possible to simplify so its posible to be used by deadly
people too? ;)

I think I will add them as is to the iproute2 package for now.

> 
> Ilya S.
> 

Thanks alot!

-nc




---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Ilya Strelkin
Details
Message ID
<be249ad40902090556s9d4fa4dn4e40e423b481a12@mail.gmail.com>
In-Reply-To
<1234175171.11678.37.camel@nc> (view parent)
Sender timestamp
1234187788
DKIM signature
missing
Download raw message
Thank you!

Having in mind a simplicity i divided configuration file onto two sections:
MAIN and ADVANCED.

Actually MAIN section has 3 parameters: up-link rate, down-link rate and
sub_percent (amount of percent of traffic to sacrifice in order to control a
queue). So in general that's all that should be adjusted before running the
script.

Thanks again for your close attention to this subject.

-is

On Mon, Feb 9, 2009 at 1:26 PM, Natanael Copa <natanael.copa@gmail.com>wrote:

> way cool!
>
> ...
>


>
> the config looks very complicated (and even includes functions)
> Would it be possible to simplify so its posible to be used by deadly
> people too? ;)
>
> I think I will add them as is to the iproute2 package for now.
>
> Thanks alot!
>
> -nc
>
>
>