[LARTC] Re: [Linux Diffserv] Can Linux 2.4 support DiffServ under IPv6 ?

2002-04-17 Thread Viktor Kemmet

Scottin wrote:

> & If can HOW ?
> 
>  
> 
> thx
> 
>  
> 

IMO you have to do almost everything the same way as for ipv4 (see HOWTO). If
you are about writing tc filter rules, try the following syntax:

tc filter replace dev eth0 parent 1:0 protocol ipv6 prio 1 u32 \
match ip6 dport 23 0x flowid 1:1

This is only one example but for a match on the destination port 23. For making
the match work on ipv6, be sure using the 'protocol ipv6' and the 'match ip6'
syntax.

If that is what you meant and if you need more info, feel free to contact me.

Viktor

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



Re: [LARTC] A tc htb/iptables rate control script for ADSL

2002-04-17 Thread Nils Lichtenfeld

Hello again!

> Only one hint for you - you can completely avoid all these
> tc filter add  fw ...
> You can use only one
> tc filter add dev ppp0 parent 1: protocol ip prio 1 handle 1 fw
>
> and set classid directly in iptables like:
> iptables -t mangle -A to-dsl -p tcp --dport 80 -j MARK --set-mark 0x10010
> iptables -t mangle -A to-dsl -p tcp --sport 24 -j MARK --set-mark 0x10020

Oh an and I forgot to ask: Is there any other improvement exept for having a
shorter script?

Greetings Nils

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



Re: [LARTC] A tc htb/iptables rate control script for ADSL

2002-04-17 Thread Nils Lichtenfeld

Hi there!

> I'm happy that HTB gained so much popularity ;)

Oh yes, its realy popular already, not only among people who now a lot about
linux, they just don't know they are using it. -> www.fli4l.de

> Only one hint for you - you can completely avoid all these
> tc filter add  fw ...
> You can use only one
> tc filter add dev ppp0 parent 1: protocol ip prio 1 handle 1 fw
>
> and set classid directly in iptables like:
> iptables -t mangle -A to-dsl -p tcp --dport 80 -j MARK --set-mark 0x10010
> iptables -t mangle -A to-dsl -p tcp --sport 24 -j MARK --set-mark 0x10020

Is this also possible with the -m option in ipchains?

Greetings Nils

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



Re: [LARTC] A tc htb/iptables rate control script for ADSL

2002-04-17 Thread Martin Devera

> > Otherwise iptables will do the whole "to-dsl" list for every packet. In
> > your case ot wouldn't matter except for some extra CPU usage. But if you
> > would like to mark port 80 as bulk-traffic and ACK's as interactive
> > traffic, then those port 80 ACK's could be marked as bulk which you
> > wouldn't want it to.
>
> Does this behavior also occure when using ipchains?

yes

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



Re: [LARTC] SFQ only on lowlevel-subclasses?

2002-04-17 Thread Martin Devera

it is not possible to attach qdisc to inner node. If you
do it it is deleted when you create 10:5 ..

On Wed, 17 Apr 2002, Nils Lichtenfeld wrote:

> Hi there!
>
> If I use a structure (with HTB) like this one:
>
> 10:0
> |   \
> 10:1  10:2
> |
> 10:3
> |   \
> 10:5  10:6
>
> Sould I only use sfq on classes 10:2, 10:5 and 10:6?
> If the answer is yes, is it a problem if sfq also runs on for example 10:3?
>
>
> Greetings Nils
>
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
>

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



Re: [LARTC] A tc htb/iptables rate control script for ADSL

2002-04-17 Thread Nils Lichtenfeld

Hello there!

> I'd also do like this:
> 
> iptables -t mangle -A to-dsl -p tcp --dport 22 -j MARK --set-mark 1
> iptables -t mangle -A to-dsl -p tcp --dport 22 -j RETURN
> 
> iptables -t mangle -A to-dsl -p tcp --dport 80 -j MARK --set-mark 2
> iptables -t mangle -A to-dsl -p tcp --dport 80 -j RETURN
> 
> etc...
> 
> Otherwise iptables will do the whole "to-dsl" list for every packet. In
> your case ot wouldn't matter except for some extra CPU usage. But if you
> would like to mark port 80 as bulk-traffic and ACK's as interactive
> traffic, then those port 80 ACK's could be marked as bulk which you
> wouldn't want it to.

Does this behavior also occure when using ipchains?

Greetings Nils


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



[LARTC] SFQ only on lowlevel-subclasses?

2002-04-17 Thread Nils Lichtenfeld

Hi there!

If I use a structure (with HTB) like this one:

10:0
|   \
10:1  10:2
|
10:3
|   \
10:5  10:6

Sould I only use sfq on classes 10:2, 10:5 and 10:6?
If the answer is yes, is it a problem if sfq also runs on for example 10:3?


Greetings Nils

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



[LARTC] who uses skb->priority?

2002-04-17 Thread ali nezhad

Hi;
Can some body please tell me what skb->priority is used for? Does DiffServ
or anything else set it or use it in the process of forwarding a packet? I
know that DiffServ uses skb->tc_index. 
If I decide to map DSCP to it in the source code, will I cause any conflict?
Where would I do that?

Thank you for your help
Ali

<>

Re: [LARTC] A tc htb/iptables rate control script for ADSL

2002-04-17 Thread Jonas Lindqvist

- Original Message -
From: "alex" <[EMAIL PROTECTED]>
> # For outgoing packets we need to mark stuff
> /sbin/iptables -t mangle -A to-dsl -p tcp --dport 22   -j MARK
> --set-mark 1
>
> /sbin/iptables -t mangle -A to-dsl -p tcp --dport 80   -j MARK
> --set-mark 2


I'd also do like this:

iptables -t mangle -A to-dsl -p tcp --dport 22 -j MARK --set-mark 1
iptables -t mangle -A to-dsl -p tcp --dport 22 -j RETURN

iptables -t mangle -A to-dsl -p tcp --dport 80 -j MARK --set-mark 2
iptables -t mangle -A to-dsl -p tcp --dport 80 -j RETURN

etc...

Otherwise iptables will do the whole "to-dsl" list for every packet. In
your case ot wouldn't matter except for some extra CPU usage. But if you
would like to mark port 80 as bulk-traffic and ACK's as interactive
traffic, then those port 80 ACK's could be marked as bulk which you
wouldn't want it to.

Which brings me to another subject :) If your DSL-connection have
different bandwidth like 1mbit/128kbit then your download speed could be
destroyed by huge queues in your uplink.

I'd guess this would do the trick.

# Set ACK as prioritized traffic (ACK's are less than 100 bytes)
$IPTABLES -t mangle -A MANGLE_MARK -p tcp -m length --length :100 -j
MARK --set-mark 1
$IPTABLES -t mangle -A MANGLE_MARK -p tcp -m length --length :100 -j
RETURN

(You could probably mark ACK's with --tcp-flags SYN,FIN,RST ACK. But I
have not tested that yet.)

They also mention this here: http://lartc.org/wondershaper/

/Jonas

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



Re: [LARTC] A tc htb/iptables rate control script for ADSL

2002-04-17 Thread Martin Devera

> The other thing that is current sub-optimal is the division of long uploads
> vs short uploads. I've attempted to ensure that normal webpages are
> downloaded as fast as possible with the burst parameter but if someone is
> downloading a large file from my website all other web users suffer. I've
> got to do some more reading but my current plan involves the iptable
> connection tracking.
>
> I'm not sure if iptables does this already but if I can match and tag a
> packet based on the time of the connection I can still allow new
> connections to get priority of long lived downloads. This may involve
> writting a new kernel module as a netfilter extension but it would be the

Hi I was already planing it ;) To add netfilter match to STATUS module
which would allow --conn-traffic from:to to select only connection whose
transfered bytes value is in given range.
Then you can have different classes for long and short downloads ..
devik

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



Re: [LARTC] Can Linux 2.4 support DiffServ under IPv6 ?

2002-04-17 Thread Arthur van Leeuwen

On Wed, 17 Apr 2002, Scottin wrote:

> & If can HOW ?

Yes. By writing your own tc32 matches. You can do QoS on any type of packet
that is queued.

Doei, Arthur.

-- 
  /\/ |  [EMAIL PROTECTED]  | Work like you don't need the money
 /__\  /  | A friend is someone with whom | Love like you have never been hurt
/\/__ | you can dare to be yourself   | Dance like there's nobody watching

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



Re: [LARTC] A tc htb/iptables rate control script for ADSL

2002-04-17 Thread Alex Bennee

Martin Devera said:
> Hi,
> I'm happy that HTB gained so much popularity ;) Only
> one hint for you - you can completely avoid all these
> tc filter add  fw ...
> You can use only one
> tc filter add dev ppp0 parent 1: protocol ip prio 1 handle 1 fw
>
> and set classid directly in iptables like:
> iptables -t mangle -A to-dsl -p tcp --dport 80 -j MARK --set-mark 0x10010
> iptables -t mangle -A to-dsl -p tcp --sport 24 -j MARK --set-mark 0x10020
>
> and so on ..
> devik


Thanks for that it should make my script a bit less cumbersome. I have also
realised that at the moment the bandwidth is being shared out in proportion
to allocated bandwidths which is not quite what I was after. Having re-read
your manual pages I've now added "prio" statements to each htb class so
that if I'm downloading from inside I get all the bandwidth I need at the
expense of the uploads, rather tha a 2:1 split. I got it the second time,
the first time I wasn't sure if prio 0 was the highest or lowest priority.

The other thing that is current sub-optimal is the division of long uploads
vs short uploads. I've attempted to ensure that normal webpages are
downloaded as fast as possible with the burst parameter but if someone is
downloading a large file from my website all other web users suffer. I've
got to do some more reading but my current plan involves the iptable
connection tracking.

I'm not sure if iptables does this already but if I can match and tag a
packet based on the time of the connection I can still allow new
connections to get priority of long lived downloads. This may involve
writting a new kernel module as a netfilter extension but it would be the
iceing on the cake to my setup :-)

Alex
www.bennee.com/~alex/


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



[LARTC] Can Linux 2.4 support DiffServ under IPv6 ?

2002-04-17 Thread Scottin



& If can HOW ?
 
thx
 


Re: [LARTC] A tc htb/iptables rate control script for ADSL

2002-04-17 Thread Martin Devera

Hi,
I'm happy that HTB gained so much popularity ;) Only
one hint for you - you can completely avoid all these
tc filter add  fw ...
You can use only one
tc filter add dev ppp0 parent 1: protocol ip prio 1 handle 1 fw

and set classid directly in iptables like:
iptables -t mangle -A to-dsl -p tcp --dport 80 -j MARK --set-mark 0x10010
iptables -t mangle -A to-dsl -p tcp --sport 24 -j MARK --set-mark 0x10020

and so on ..
devik


On 17 Apr 2002, alex wrote:

> /sbin/iptables -t mangle -A to-dsl -p tcp --dport 22   -j MARK
> --set-mark 1
>
> /sbin/iptables -t mangle -A to-dsl -p tcp --dport 80   -j MARK
> --set-mark 2
>
> /sbin/tc filter add dev ppp0 parent 1: protocol ip prio 1 handle 1
> fw classid 1:10
> /sbin/tc filter add dev ppp0 parent 1: protocol ip prio 2 handle 2
> fw classid 1:20

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