From: "Cow" Date: Thu, 30 Sep 2004 10:58:22 +0000 Subject: Re: [LARTC] Shaping not working Message-Id: <001601c4a6dc$6a05d6c0$6e1464ab@palle> MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0013_01C4A6ED.2A9ABB20" List-Id: References: <008801c4a528$6f39f280$3700a8c0@nathanxp> In-Reply-To: <008801c4a528$6f39f280$3700a8c0@nathanxp> To: lartc@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_0013_01C4A6ED.2A9ABB20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Try this link, might help: http://omg.wp.gg/wshaper-howto/ ----- Original Message -----=20 From: Stephan M. Ott=20 To: lartc@mailman.ds9a.nl=20 Sent: Tuesday, September 28, 2004 8:57 AM Subject: [LARTC] Shaping not working Hi folks, =20 I'm trying to shape two clients in my LAN when accessing the internet. Actual situation is that EVERY traffic goes into 1:40, so the client = which should fall into 1:30 does not get the lower uplink it should = have, but the uplink defined for the client defined as 1:30 When I disable the definition of 1:40, every traffic falls into 1:30 = (except for the traffic defined to be in 1:10 and 1:20, this works) As I'm somewhat new to this, I'm stuck and don't know what I have to = change in order to make it work. =20 Here's part of the script: =20 tc qdisc del dev $DEV root 2> /dev/null > /dev/null tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null =20 iptables -t mangle -A FORWARD -s 192.168.0.51/29 -j MARK --set-mark 8 iptables -t mangle -A FORWARD -s 192.168.0.55/29 -j MARK --set-mark = 128 =20 ###### uplink =20 tc qdisc add dev $DEV root handle 1: htb default 20 =20 tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit = burst 6k =20 tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \ burst 6k prio 1 =20 tc class add dev $DEV parent 1:1 classid 1:20 htb rate = $[9*$UPLINK/10]kbit \ burst 6k prio 2 =20 tc class add dev $DEV parent 1:1 classid 1:30 htb rate 64kbit burst 6k = prio 3 tc class add dev $DEV parent 1:1 classid 1:40 htb rate 128kbit burst = 6k prio 4 =20 tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 =20 tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev $DEV parent 1:40 handle 40: sfq perturb 10 =20 tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ match ip tos 0x10 0xff flowid 1:10 =20 tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ match ip protocol 1 0xff flowid 1:10 =20 tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ match ip protocol 6 0xff \ match u8 0x05 0x0f at 0 \ match u16 0x0000 0xffc0 at 2 \ match u8 0x10 0xff at 33 \ flowid 1:10 =20 tc filter add dev $DEV parent 1:0 protocol ip prio 30 handle 8 fw = flowid 1:30 tc filter add dev $DEV parent 1:0 protocol ip prio 40 handle 128 fw = flowid 1:40 =20 =20 Can someone help me out ? What goes wrong here ? Thanks in advance. =20 Stephan. =20 ------=_NextPart_000_0013_01C4A6ED.2A9ABB20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Try this link, might help:
 
http://omg.wp.gg/wshaper-howto/<= /A>
----- Original Message -----
From:=20 Stephan M. Ott
Sent: Tuesday, September 28, = 2004 8:57=20 AM
Subject: [LARTC] Shaping not=20 working

Hi=20 folks,

 

I=92m=20 trying to shape two clients in my LAN when accessing the=20 internet.

Actual=20 situation is that EVERY traffic goes into 1:40, so the=20 client which should fall into = 1:30 does=20 not get the lower uplink it should have, but the uplink defined for = the client=20 defined as 1:30

When I=20 disable the definition of 1:40, every traffic falls into 1:30 (except=20 for the traffic defined to be in 1:10 and=20 1:20, this=20 works)

As I=92m=20 somewhat new to this, I=92m stuck and don=92t know what I have to = change in order=20 to make it work.

 

Here=92s=20 part of the script:

 

tc=20 qdisc = del=20 dev $DEV root    = 2>=20 /dev/null > /dev/null

tc=20 qdisc del dev $DEV ingress 2> /dev/null >=20 /dev/null

 

iptables=20 -t mangle -A FORWARD -s 192.168.0.51/29 -j MARK --set-mark=20 8

iptables=20 -t mangle -A FORWARD -s 192.168.0.55/29 -j MARK --set-mark=20 128

 

######=20 uplink

 

tc=20 qdisc add dev $DEV root handle 1: htb default 20

 

tc=20 class add dev $DEV parent 1: classid 1:1 = htb rate ${UPLINK}kbit burst=20 6k

 

tc=20 class add dev $DEV parent 1:1 classid=20 1:10=20 htb rate ${UPLINK}kbit=20 \

   burst=20 6k prio 1

 

tc=20 class add dev $DEV parent 1:1 classid=20 1:20=20 htb rate $[9*$UPLINK/10]kbit \

   burst=20 6k prio 2

 

tc=20 class add dev $DEV parent 1:1 classid=20 1:30=20 htb rate 64kbit burst 6k prio 3

tc=20 class add dev $DEV parent 1:1 classid=20 1:40=20 htb rate 128kbit burst 6k prio 4

 

tc=20 qdisc add dev $DEV parent = 1:10=20 handle 10: sfq perturb=20 10

tc=20 qdisc add dev $DEV parent = 1:20=20 handle 20: sfq perturb=20 10

 

tc=20 qdisc add dev $DEV parent = 1:30=20 handle 30: sfq perturb=20 10

tc=20 qdisc add dev $DEV parent = 1:40=20 handle 40: sfq perturb=20 10

 

tc=20 filter add dev $DEV parent 1:0 protocol ip prio 10 u32=20 \

     =20 match=20 ip tos 0x10 = 0xff  flowid=20 1:10

 

tc=20 filter add dev $DEV parent 1:0 protocol ip prio 10 u32=20 \

        = match=20 ip protocol 1 0xff flowid=20 1:10

 

tc=20 filter add dev $DEV parent 1: protocol ip prio 10 u32=20 \

   match=20 ip protocol 6 0xff = \

   match=20 u8 0x05 0x0f at 0 \

   match=20 u16 0x0000 0xffc0 at 2 \

   match=20 u8 0x10 0xff at 33 \

   flowid 1:10

 

tc=20 filter add dev $DEV parent 1:0 protocol ip = prio 30 handle 8 fw = flowid 1:30

tc=20 filter add dev $DEV parent 1:0 protocol ip = prio 40 handle 128 fw flowid 1:40

 

 

Can=20 someone help me out ? What goes wrong here ?

Thanks=20 in advance.

 

Stephan.

 

------=_NextPart_000_0013_01C4A6ED.2A9ABB20-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/