All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] [LONG] Weird problem with HTB using htb.init
@ 2003-03-16 20:52 Ricardo Jorge da Fonseca Marques Ferreira
  2003-03-16 22:13 ` Stef Coene
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ricardo Jorge da Fonseca Marques Ferreira @ 2003-03-16 20:52 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 3771 bytes --]

This is a long message. Please use a monospace font :)

I'm trying to shape the traffic between my LAN and the Internet. My link is an 
ADSL 512/128 line. The network is shaped like this:

       LAN                     GATEWAY                 ROUTER
 ------------------          -------------          ------------
|  192.168.0.1/16  | <----> | 192.168.0.1 | <----> | 10.0.0.138 | <--> INET
 ------------------          -------------          ------------

NAT/PAT/MASQ occurs in two places. From gateway to router (192.168.0.1/16 -> 
10.0.0.1/8) and from router to net. I've put the shaper in my gateway and am 
trying to shape both incoming & outgoing traffic by placing shapers at both 
eth0 (download) & eth1 (upload). This to keep my connection usable while i'm 
running emule or other mass downloader/p2p programs.

What i'm trying to do is shape every upload to max 90kbit/s but give priority 
to HTTP,SSH,TELNET,POP3,SMTP,DNS & low priority to everything else. The same 
thing for the downloads but this time for 450kbit/s.

What happens is emule works as normal but HTTP gives lots of timeouts on 
connecting, and even when it connects, it continues to timeout on the images 
of the pages for example. But i've been able to determine by listening to a 
shoutcast stream that uses port 80 that once the connection is made it stays 
stable. So the problem seems to be establishing new connections. I dont know 
if the other protocols dont suffer from this problem or they have larger 
timeouts.

I've changed every htb.init option i could think of and i couldnt fix it. If 
someone has an idea please say something.

Thanks.

Attached are the commands generated by htb.ini compile & the list from 
htb.init list & htb.init stats.


The class files on eth1 (upload) are:
-------------/-------------

root@sentinel:/etc/sysconfig/htb# ls eth1*
eth1  eth1-2.root  eth1-2:10.high  eth1-2:20.normal  eth1-2:30.low

root@sentinel:/etc/sysconfig/htb# cat eth1
DEFAULT=30
R2Q=1

root@sentinel:/etc/sysconfig/htb# cat eth1-2.root
# root class for outgoing traffic
RATE=90Kbit
LEAF=sfq

root@sentinel:/etc/sysconfig/htb# cat eth1-2\:10.high
# class for outgoing high priority traffic
RATE=30Kbit
CEIL=prate
#BURST=15k
LEAF=sfq

# HTTP
RULE=*:80
# SSH
RULE=*:22
# TELNET
RULE=*:23
# SMTP
RULE=*:25
# DNS
RULE=*:53
# POP3
RULE=*:110

root@sentinel:/etc/sysconfig/htb# cat eth1-2\:20.normal
# class for outgoing normal traffic
RATE=30Kbit
CEIL=prate
# BURST=15k
LEAF=sfq

# IRC
RULE=*:6667

root@sentinel:/etc/sysconfig/htb# cat eth1-2\:30.low
# default class for unclassified traffic
RATE=20Kbit
CEIL=prate
# BURST=15k
LEAF=sfq

# EMULE
RULE=*:3000
RULE=*:3000,
RULE=*:3010
RULE=*:3010,
RULE=*:4662
RULE=*:4662,
--------------/-------------------

The class files for eth0 download:
-------------/--------------------

root@sentinel:/etc/sysconfig/htb# ls eth0*
eth0  eth0-2.root  eth0-2:10.high  eth0-2:20.normal  eth0-2:30.low

root@sentinel:/etc/sysconfig/htb# cat eth0
DEFAULT=30
R2Q=10

root@sentinel:/etc/sysconfig/htb# cat eth0-2.root
# root class for outgoing traffic
RATE=450Kbit
#BURST=15k
LEAF=sfq

root@sentinel:/etc/sysconfig/htb# cat eth0-2\:10.high
# class for outgoing high priority traffic
RATE=150Kbit
CEIL=prate
#BURST=15k
LEAF=sfq

# HTTP
RULE=*:80,
# SSH
RULE=*:22,
# TELNET
RULE=*:23,
# SMTP
RULE=*:25,
# DNS
RULE=*:53,
# POP3
RULE=*:110,

root@sentinel:/etc/sysconfig/htb# cat eth0-2\:20.normal
# class for outgoing normal traffic
RATE=150Kbit
CEIL=prate
# BURST=15k
LEAF=sfq

# IRC
RULE=*:6667,

root@sentinel:/etc/sysconfig/htb# cat eth0-2\:30.low
# class for low priority traffic
RATE=150Kbit
CEIL=prate
# BURST=15k
LEAF=sfq

# EMULE
RULE=*:3000,
RULE=*:3010,
RULE=*:4662,
RULE=*:3000
RULE=*:3010
RULE=*:4662
--------------------/-------------------

[-- Attachment #2: htbinit_compile.txt --]
[-- Type: text/plain, Size: 3770 bytes --]

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 htb default 30 r2q 10

tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1 htb default 30 r2q 1

tc class add dev eth0 parent 1: classid 1:2 htb rate 450Kbit
tc qdisc add dev eth0 parent 1:2 handle 2 sfq perturb 10

tc class add dev eth0 parent 1:2 classid 1:10 htb rate 150Kbit ceil 450Kbit
tc qdisc add dev eth0 parent 1:10 handle 10 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 80 0xffff classid 1:10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 22 0xffff classid 1:10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 23 0xffff classid 1:10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 25 0xffff classid 1:10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 53 0xffff classid 1:10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 110 0xffff classid 1:10

tc class add dev eth0 parent 1:2 classid 1:20 htb rate 150Kbit ceil 450Kbit
tc qdisc add dev eth0 parent 1:20 handle 20 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 6667 0xffff classid 1:20

tc class add dev eth0 parent 1:2 classid 1:30 htb rate 150Kbit ceil 450Kbit
tc qdisc add dev eth0 parent 1:30 handle 30 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 3000 0xffff classid 1:30
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 3010 0xffff classid 1:30
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip sport 4662 0xffff classid 1:30
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dport 3000 0xffff classid 1:30
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dport 3010 0xffff classid 1:30
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dport 4662 0xffff classid 1:30

tc class add dev eth1 parent 1: classid 1:2 htb rate 90Kbit
tc qdisc add dev eth1 parent 1:2 handle 2 sfq perturb 10

tc class add dev eth1 parent 1:2 classid 1:10 htb rate 30Kbit ceil 90Kbit
tc qdisc add dev eth1 parent 1:10 handle 10 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 80 0xffff classid 1:10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 22 0xffff classid 1:10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 23 0xffff classid 1:10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 25 0xffff classid 1:10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 53 0xffff classid 1:10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 110 0xffff classid 1:10

tc class add dev eth1 parent 1:2 classid 1:20 htb rate 30Kbit ceil 90Kbit
tc qdisc add dev eth1 parent 1:20 handle 20 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 6667 0xffff classid 1:20

tc class add dev eth1 parent 1:2 classid 1:30 htb rate 20Kbit ceil 90Kbit
tc qdisc add dev eth1 parent 1:30 handle 30 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 3000 0xffff classid 1:30
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip sport 3000 0xffff classid 1:30
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 3010 0xffff classid 1:30
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip sport 3010 0xffff classid 1:30
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 4662 0xffff classid 1:30
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip sport 4662 0xffff classid 1:30


[-- Attachment #3: htbinit_list.txt --]
[-- Type: text/plain, Size: 4758 bytes --]

### eth0: queueing disciplines

qdisc sfq 30: quantum 1514b perturb 10sec 
qdisc sfq 20: quantum 1514b perturb 10sec 
qdisc sfq 10: quantum 1514b perturb 10sec 
qdisc htb 1: r2q 10 default 30 direct_packets_stat 79

### eth0: traffic classes

class htb 1:10 parent 1:2 leaf 10: prio 0 rate 150Kbit ceil 450Kbit burst 1791b cburst 2175b 
class htb 1:2 root rate 450Kbit ceil 450Kbit burst 2175b cburst 2175b 
class htb 1:20 parent 1:2 leaf 20: prio 0 rate 150Kbit ceil 450Kbit burst 1791b cburst 2175b 
class htb 1:30 parent 1:2 leaf 30: prio 0 rate 150Kbit ceil 450Kbit burst 1791b cburst 2175b 

### eth0: filtering rules

filter parent 1: protocol ip pref 100 u32 
filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 
  match 00500000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:10 
  match 00160000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::802 order 2050 key ht 800 bkt 0 flowid 1:10 
  match 00170000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::803 order 2051 key ht 800 bkt 0 flowid 1:10 
  match 00190000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::804 order 2052 key ht 800 bkt 0 flowid 1:10 
  match 00350000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::805 order 2053 key ht 800 bkt 0 flowid 1:10 
  match 006e0000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::806 order 2054 key ht 800 bkt 0 flowid 1:20 
  match 1a0b0000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::807 order 2055 key ht 800 bkt 0 flowid 1:30 
  match 0bb80000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::808 order 2056 key ht 800 bkt 0 flowid 1:30 
  match 0bc20000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::809 order 2057 key ht 800 bkt 0 flowid 1:30 
  match 12360000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80a order 2058 key ht 800 bkt 0 flowid 1:30 
  match 00000bb8/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80b order 2059 key ht 800 bkt 0 flowid 1:30 
  match 00000bc2/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80c order 2060 key ht 800 bkt 0 flowid 1:30 
  match 00001236/0000ffff at 20

### eth1: queueing disciplines

qdisc sfq 30: quantum 1514b perturb 10sec 
qdisc sfq 20: quantum 1514b perturb 10sec 
qdisc sfq 10: quantum 1514b perturb 10sec 
qdisc htb 1: r2q 1 default 30 direct_packets_stat 100

### eth1: traffic classes

class htb 1:10 parent 1:2 leaf 10: prio 0 rate 30Kbit ceil 90Kbit burst 1637b cburst 1714b 
class htb 1:2 root rate 90Kbit ceil 90Kbit burst 1714b cburst 1714b 
class htb 1:20 parent 1:2 leaf 20: prio 0 rate 30Kbit ceil 90Kbit burst 1637b cburst 1714b 
class htb 1:30 parent 1:2 leaf 30: prio 0 rate 20Kbit ceil 90Kbit burst 1624b cburst 1714b 

### eth1: filtering rules

filter parent 1: protocol ip pref 100 u32 
filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 
  match 00000050/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:10 
  match 00000016/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::802 order 2050 key ht 800 bkt 0 flowid 1:10 
  match 00000017/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::803 order 2051 key ht 800 bkt 0 flowid 1:10 
  match 00000019/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::804 order 2052 key ht 800 bkt 0 flowid 1:10 
  match 00000035/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::805 order 2053 key ht 800 bkt 0 flowid 1:10 
  match 0000006e/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::806 order 2054 key ht 800 bkt 0 flowid 1:20 
  match 00001a0b/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::807 order 2055 key ht 800 bkt 0 flowid 1:30 
  match 00000bb8/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::808 order 2056 key ht 800 bkt 0 flowid 1:30 
  match 0bb80000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::809 order 2057 key ht 800 bkt 0 flowid 1:30 
  match 00000bc2/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80a order 2058 key ht 800 bkt 0 flowid 1:30 
  match 0bc20000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80b order 2059 key ht 800 bkt 0 flowid 1:30 
  match 00001236/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80c order 2060 key ht 800 bkt 0 flowid 1:30 
  match 12360000/ffff0000 at 20


[-- Attachment #4: htbinit_stats.txt --]
[-- Type: text/plain, Size: 6503 bytes --]

### eth0: queueing disciplines

qdisc sfq 30: quantum 1514b perturb 10sec 
 Sent 217128823 bytes 400593 pkts (dropped 0, overlimits 0) 

 qdisc sfq 20: quantum 1514b perturb 10sec 
 Sent 402075 bytes 2659 pkts (dropped 0, overlimits 0) 

 qdisc sfq 10: quantum 1514b perturb 10sec 
 Sent 38096835 bytes 39328 pkts (dropped 0, overlimits 0) 

 qdisc htb 1: r2q 10 default 30 direct_packets_stat 79
 Sent 255653075 bytes 442662 pkts (dropped 0, overlimits 9189) 

 
### eth0: traffic classes

class htb 1:10 parent 1:2 leaf 10: prio 0 rate 150Kbit ceil 450Kbit burst 1791b cburst 2175b 
 Sent 38099783 bytes 39330 pkts (dropped 0, overlimits 0) 
 rate 18962bps 20pps 
 lended: 33297 borrowed: 6033 giants: 0
 tokens: -32766 ctokens: 5462

class htb 1:2 root rate 450Kbit ceil 450Kbit burst 2175b cburst 2175b 
 Sent 255639226 bytes 442610 pkts (dropped 0, overlimits 0) 
 rate 53115bps 94pps 
 lended: 224141 borrowed: 0 giants: 0
 tokens: -19522 ctokens: -19522

class htb 1:20 parent 1:2 leaf 20: prio 0 rate 150Kbit ceil 450Kbit burst 1791b cburst 2175b 
 Sent 402075 bytes 2659 pkts (dropped 0, overlimits 0) 
 rate 59bps 
 lended: 2659 borrowed: 0 giants: 0
 tokens: 70656 ctokens: 29012

class htb 1:30 parent 1:2 leaf 30: prio 0 rate 150Kbit ceil 450Kbit burst 1791b cburst 2175b 
 Sent 217137368 bytes 400621 pkts (dropped 0, overlimits 0) 
 rate 33973bps 72pps 
 lended: 182513 borrowed: 218108 giants: 0
 tokens: -54574 ctokens: 344


### eth0: filtering rules

filter parent 1: protocol ip pref 100 u32 
filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 
  match 00500000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:10 
  match 00160000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::802 order 2050 key ht 800 bkt 0 flowid 1:10 
  match 00170000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::803 order 2051 key ht 800 bkt 0 flowid 1:10 
  match 00190000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::804 order 2052 key ht 800 bkt 0 flowid 1:10 
  match 00350000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::805 order 2053 key ht 800 bkt 0 flowid 1:10 
  match 006e0000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::806 order 2054 key ht 800 bkt 0 flowid 1:20 
  match 1a0b0000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::807 order 2055 key ht 800 bkt 0 flowid 1:30 
  match 0bb80000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::808 order 2056 key ht 800 bkt 0 flowid 1:30 
  match 0bc20000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::809 order 2057 key ht 800 bkt 0 flowid 1:30 
  match 12360000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80a order 2058 key ht 800 bkt 0 flowid 1:30 
  match 00000bb8/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80b order 2059 key ht 800 bkt 0 flowid 1:30 
  match 00000bc2/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80c order 2060 key ht 800 bkt 0 flowid 1:30 
  match 00001236/0000ffff at 20

### eth1: queueing disciplines

qdisc sfq 30: quantum 1514b perturb 10sec 
 Sent 57345159 bytes 382332 pkts (dropped 17828, overlimits 0) 
 backlog 71p 

 qdisc sfq 20: quantum 1514b perturb 10sec 
 Sent 193238 bytes 3292 pkts (dropped 0, overlimits 0) 

 qdisc sfq 10: quantum 1514b perturb 10sec 
 Sent 8872705 bytes 27808 pkts (dropped 0, overlimits 0) 

 qdisc htb 1: r2q 1 default 30 direct_packets_stat 100
 Sent 66429758 bytes 413534 pkts (dropped 17828, overlimits 435709) 
 backlog 71p 

 
### eth1: traffic classes

class htb 1:10 parent 1:2 leaf 10: prio 0 rate 30Kbit ceil 90Kbit burst 1637b cburst 1714b 
 Sent 8872771 bytes 27809 pkts (dropped 0, overlimits 0) 
 rate 5001bps 11pps 
 lended: 22409 borrowed: 5400 giants: 0
 tokens: 335787 ctokens: 117405

class htb 1:2 root rate 90Kbit ceil 90Kbit burst 1714b cburst 1714b 
 Sent 66217756 bytes 413399 pkts (dropped 0, overlimits 0) 
 rate 11693bps 71pps 
 lended: 277237 borrowed: 0 giants: 0
 tokens: -30821 ctokens: -30821

class htb 1:20 parent 1:2 leaf 20: prio 0 rate 30Kbit ceil 90Kbit burst 1637b cburst 1714b 
 Sent 193238 bytes 3292 pkts (dropped 0, overlimits 0) 
 rate 34bps 
 lended: 3292 borrowed: 0 giants: 0
 tokens: 339199 ctokens: 118543

class htb 1:30 parent 1:2 leaf 30: prio 0 rate 20Kbit ceil 90Kbit burst 1624b cburst 1714b 
 Sent 57346186 bytes 382348 pkts (dropped 17828, overlimits 0) 
 rate 6496bps 58pps backlog 50p 
 lended: 110461 borrowed: 271837 giants: 0
 tokens: -152254 ctokens: -7707


### eth1: filtering rules

filter parent 1: protocol ip pref 100 u32 
filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 
  match 00000050/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:10 
  match 00000016/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::802 order 2050 key ht 800 bkt 0 flowid 1:10 
  match 00000017/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::803 order 2051 key ht 800 bkt 0 flowid 1:10 
  match 00000019/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::804 order 2052 key ht 800 bkt 0 flowid 1:10 
  match 00000035/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::805 order 2053 key ht 800 bkt 0 flowid 1:10 
  match 0000006e/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::806 order 2054 key ht 800 bkt 0 flowid 1:20 
  match 00001a0b/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::807 order 2055 key ht 800 bkt 0 flowid 1:30 
  match 00000bb8/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::808 order 2056 key ht 800 bkt 0 flowid 1:30 
  match 0bb80000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::809 order 2057 key ht 800 bkt 0 flowid 1:30 
  match 00000bc2/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80a order 2058 key ht 800 bkt 0 flowid 1:30 
  match 0bc20000/ffff0000 at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80b order 2059 key ht 800 bkt 0 flowid 1:30 
  match 00001236/0000ffff at 20
filter parent 1: protocol ip pref 100 u32 fh 800::80c order 2060 key ht 800 bkt 0 flowid 1:30 
  match 12360000/ffff0000 at 20


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] [LONG] Weird problem with HTB using htb.init
  2003-03-16 20:52 [LARTC] [LONG] Weird problem with HTB using htb.init Ricardo Jorge da Fonseca Marques Ferreira
@ 2003-03-16 22:13 ` Stef Coene
  2003-03-16 22:29 ` Ricardo Jorge da Fonseca Marques Ferreira
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Stef Coene @ 2003-03-16 22:13 UTC (permalink / raw)
  To: lartc

On Sunday 16 March 2003 21:52, Ricardo Jorge da Fonseca Marques Ferreira 
wrote:
> This is a long message. Please use a monospace font :)
>
> I'm trying to shape the traffic between my LAN and the Internet. My link is
> an ADSL 512/128 line. The network is shaped like this:
>
>        LAN                     GATEWAY                 ROUTER
>  ------------------          -------------          ------------
>
> |  192.168.0.1/16  | <----> | 192.168.0.1 | <----> | 10.0.0.138 | <--> INET
>
>  ------------------          -------------          ------------
>
> NAT/PAT/MASQ occurs in two places. From gateway to router (192.168.0.1/16
> -> 10.0.0.1/8) and from router to net. I've put the shaper in my gateway
> and am trying to shape both incoming & outgoing traffic by placing shapers
> at both eth0 (download) & eth1 (upload). This to keep my connection usable
> while i'm running emule or other mass downloader/p2p programs.
>
> What i'm trying to do is shape every upload to max 90kbit/s but give
> priority to HTTP,SSH,TELNET,POP3,SMTP,DNS & low priority to everything
> else. The same thing for the downloads but this time for 450kbit/s.
>
> What happens is emule works as normal but HTTP gives lots of timeouts on
> connecting, and even when it connects, it continues to timeout on the
> images of the pages for example. But i've been able to determine by
> listening to a shoutcast stream that uses port 80 that once the connection
> is made it stays stable. So the problem seems to be establishing new
> connections. I dont know if the other protocols dont suffer from this
> problem or they have larger timeouts.
I executed your script on my router and I had no http timeouts.  Everything 
went fine.

> I've changed every htb.init option i could think of and i couldnt fix it.
> If someone has an idea please say something.
You have a sfq qdisc attached to your parent class.  That's not possible.  You 
can add the sfq qdisc, but if you add a child class, the sfq qdisc is 
removed.

> Thanks.
>
> Attached are the commands generated by htb.ini compile & the list from
> htb.init list & htb.init stats.
I looked at your tc stats, and I found it strange that you have negative 
tokens and ctokens.  But I don't think this is causing the http timeouts.
If you have these timeouts, is your link havely used?  If yes, you can try to 
prorize ACKS/SYN packets.  

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] [LONG] Weird problem with HTB using htb.init
  2003-03-16 20:52 [LARTC] [LONG] Weird problem with HTB using htb.init Ricardo Jorge da Fonseca Marques Ferreira
  2003-03-16 22:13 ` Stef Coene
@ 2003-03-16 22:29 ` Ricardo Jorge da Fonseca Marques Ferreira
  2003-03-17 17:25 ` Stef Coene
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ricardo Jorge da Fonseca Marques Ferreira @ 2003-03-16 22:29 UTC (permalink / raw)
  To: lartc

On Sunday 16 March 2003 22:13, Stef Coene wrote:
>
> You have a sfq qdisc attached to your parent class.  That's not possible. 
> You can add the sfq qdisc, but if you add a child class, the sfq qdisc is
> removed.

Hmm, i removed it. Still timeouts, but it wouldnt matter as it would be 
removed anyway.

> I looked at your tc stats, and I found it strange that you have negative
> tokens and ctokens.  But I don't think this is causing the http timeouts.
> If you have these timeouts, is your link havely used?  If yes, you can try
> to prorize ACKS/SYN packets.

I've seen it happening when i'm limiting emule traffic to 150kbit/s download & 
30kbit/s upload and the emule program itself showed it was not above those 
limits through its graphs. One thing with emule is it creates ALOT of 
connections. I have alot of downloads on queue and some of those have more 
than 1500 sources. Could it be that the huge number of connections is 
confusing some part of Linux QoS ?
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] [LONG] Weird problem with HTB using htb.init
  2003-03-16 20:52 [LARTC] [LONG] Weird problem with HTB using htb.init Ricardo Jorge da Fonseca Marques Ferreira
  2003-03-16 22:13 ` Stef Coene
  2003-03-16 22:29 ` Ricardo Jorge da Fonseca Marques Ferreira
@ 2003-03-17 17:25 ` Stef Coene
  2003-03-17 22:58 ` Ricardo Jorge da Fonseca Marques Ferreira
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Stef Coene @ 2003-03-17 17:25 UTC (permalink / raw)
  To: lartc

On Sunday 16 March 2003 23:29, Ricardo Jorge da Fonseca Marques Ferreira 
wrote:
> On Sunday 16 March 2003 22:13, Stef Coene wrote:
> > You have a sfq qdisc attached to your parent class.  That's not possible.
> > You can add the sfq qdisc, but if you add a child class, the sfq qdisc is
> > removed.
>
> Hmm, i removed it. Still timeouts, but it wouldnt matter as it would be
> removed anyway.
>
> > I looked at your tc stats, and I found it strange that you have negative
> > tokens and ctokens.  But I don't think this is causing the http timeouts.
> > If you have these timeouts, is your link havely used?  If yes, you can
> > try to prorize ACKS/SYN packets.
>
> I've seen it happening when i'm limiting emule traffic to 150kbit/s
> download & 30kbit/s upload and the emule program itself showed it was not
> above those limits through its graphs. One thing with emule is it creates
> ALOT of connections. I have alot of downloads on queue and some of those
> have more than 1500 sources. Could it be that the huge number of
> connections is confusing some part of Linux QoS ?
Mhh.  It can be.  If you add a sfq qdisc, each connection will create a new 
entry in the hash key.  But I don't know what happens if the hash key is 
full.  If all other connections end up in 1 hash key, it's possible that you 
get timeouts.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] [LONG] Weird problem with HTB using htb.init
  2003-03-16 20:52 [LARTC] [LONG] Weird problem with HTB using htb.init Ricardo Jorge da Fonseca Marques Ferreira
                   ` (2 preceding siblings ...)
  2003-03-17 17:25 ` Stef Coene
@ 2003-03-17 22:58 ` Ricardo Jorge da Fonseca Marques Ferreira
  2003-03-18  2:32 ` S Mohan
  2003-03-18  3:05 ` Ricardo Jorge da Fonseca Marques Ferreira
  5 siblings, 0 replies; 7+ messages in thread
From: Ricardo Jorge da Fonseca Marques Ferreira @ 2003-03-17 22:58 UTC (permalink / raw)
  To: lartc

On Monday 17 March 2003 17:25, Stef Coene wrote:
> Mhh.  It can be.  If you add a sfq qdisc, each connection will create a new
> entry in the hash key.  But I don't know what happens if the hash key is
> full.  If all other connections end up in 1 hash key, it's possible that
> you get timeouts.

Hmmm, i closed emule and started an upload using all my UP bandwidth & a 
download using roughly what emule used. They all fall into the same classes 
that emule traffic did. I get no timeouts this way. If the number of 
connections is the problem, is there anyway to prevent this ?

Thanks
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [LARTC] [LONG] Weird problem with HTB using htb.init
  2003-03-16 20:52 [LARTC] [LONG] Weird problem with HTB using htb.init Ricardo Jorge da Fonseca Marques Ferreira
                   ` (3 preceding siblings ...)
  2003-03-17 22:58 ` Ricardo Jorge da Fonseca Marques Ferreira
@ 2003-03-18  2:32 ` S Mohan
  2003-03-18  3:05 ` Ricardo Jorge da Fonseca Marques Ferreira
  5 siblings, 0 replies; 7+ messages in thread
From: S Mohan @ 2003-03-18  2:32 UTC (permalink / raw)
  To: lartc

Could it be a problem of port mapping? Emule, edonkey and other use free
ports and are not specific about which port they use. If they try to use
some ports blocked for inward traffic, timeouts are logical. I may be
wrong here as I do not know the exact set up.

Mohan

-----Original Message-----
From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl]
On Behalf Of Ricardo Jorge da Fonseca Marques Ferreira
Sent: Tuesday, March 18, 2003 4:28 AM
To: Stef Coene; lartc@mailman.ds9a.nl
Subject: Re: [LARTC] [LONG] Weird problem with HTB using htb.init


On Monday 17 March 2003 17:25, Stef Coene wrote:
> Mhh.  It can be.  If you add a sfq qdisc, each connection will create 
> a new entry in the hash key.  But I don't know what happens if the 
> hash key is full.  If all other connections end up in 1 hash key, it's

> possible that you get timeouts.

Hmmm, i closed emule and started an upload using all my UP bandwidth & a

download using roughly what emule used. They all fall into the same
classes 
that emule traffic did. I get no timeouts this way. If the number of 
connections is the problem, is there anyway to prevent this ?

Thanks
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] [LONG] Weird problem with HTB using htb.init
  2003-03-16 20:52 [LARTC] [LONG] Weird problem with HTB using htb.init Ricardo Jorge da Fonseca Marques Ferreira
                   ` (4 preceding siblings ...)
  2003-03-18  2:32 ` S Mohan
@ 2003-03-18  3:05 ` Ricardo Jorge da Fonseca Marques Ferreira
  5 siblings, 0 replies; 7+ messages in thread
From: Ricardo Jorge da Fonseca Marques Ferreira @ 2003-03-18  3:05 UTC (permalink / raw)
  To: lartc

On Tuesday 18 March 2003 02:20, S Mohan wrote:
> Could it be a problem of port mapping? Emule, edonkey and other use free
> ports and are not specific about which port they use. If they try to use
> some ports blocked for inward traffic, timeouts are logical. I may be
> wrong here as I do not know the exact set up.
>

I dont think so, because i experience timeouts with protocols like http,smtp, 
etc which have standard ports. Emule doesnt timeout or if it does i dont get 
notified about it.

It must be because of the large connection numbers.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-03-18  3:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-16 20:52 [LARTC] [LONG] Weird problem with HTB using htb.init Ricardo Jorge da Fonseca Marques Ferreira
2003-03-16 22:13 ` Stef Coene
2003-03-16 22:29 ` Ricardo Jorge da Fonseca Marques Ferreira
2003-03-17 17:25 ` Stef Coene
2003-03-17 22:58 ` Ricardo Jorge da Fonseca Marques Ferreira
2003-03-18  2:32 ` S Mohan
2003-03-18  3:05 ` Ricardo Jorge da Fonseca Marques Ferreira

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.