OpenWrt Forum Archive

Topic: QOS-Scripts and source filtering before ipp2p filtering

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

I have a Linksys WRT54G with Kamikaze 7.09 and WebIf² with installed qos-scripts and want to limit the bandwith that we are granting several internal LAN ips. To accomplish that I have created two new classes in /etc/config/qos "Neighbours" and "Neighbours_down" and set the limitrate options respectively. At the moment, the problem seems to be, that the ipp2p filters mark the packets into the bulk classes (set mark 0x3) before they can be marked into my new classes, although I have put the regarding classify parts at the beginning. My qos config is posted at the end of this post.
Is it possible that the netfilter "mangle" tables can mark a packet twice? How is the order determined, in which the packets get sorted in the TC classes created by the qos scripts? Anyone got any ideas?

Thanks in advance,

Tristan


*** Begin ***
# QoS configuration for OpenWrt

# INTERFACES:
config interface wan
        option classgroup  "Default"
        option enabled  '1'
        option overhead '0'
        option upload   '980'
        option download '10600'

# RULES:
config classify
        option target       "Neighbours"
        option srchost      "192.168.1.140"

config classify
        option target       "Neighbours"
        option dsthost      "192.168.1.140"

config classify
        option target       "Neighbours"
        option srchost      "192.168.1.141"

config classify
        option target       "Neighbours"
        option dsthost      "192.168.1.141"

config classify
        option target       "Neighbours"
        option srchost      "192.168.1.142"

config classify
        option target       "Neighbours"
        option dsthost      "192.168.1.142"

#config classify
#       option target       "Neighbours"
#       option dsthost      "192.168.1.102"

config classify
        option target       "Bulk"
        option ipp2p    'bit'

config classify
        option target       "Bulk"
        option ipp2p    'dc'

config classify
        option target       "Bulk"
        option ipp2p    'edk'

        option target       "Bulk"
        option ipp2p    'gnu'

config classify
        option target       "Priority"
        option ports        "22,53"

config classify
        option target       "Express"
        option layer7       "counterstrike-source"

config classify
        option target       "Normal"
        option proto        "tcp"
        option ports        '20,21,25,80,110,443,993,995'

config reclassify
        option target       "Priority"
        option proto        "icmp"

config classify
        option target       "Priority"
        option proto        "tcp"


# Don't change the stuff below unless you
# really know what it means smile

config classgroup "Default"
        option classes      "Priority Express Normal Bulk Neighbours"
        option default      "Normal"

config class "Neighbours"
        option packetsize  1500
        option avgrate     10
        option packetdelay 100
        option limitrate   15
        option priority    1

config class "Neighbours_down"
        option avgrate     10
        option limitrate   20

config class "Priority"
        option packetsize  400
        option maxsize     400
        option avgrate     10
        option priority    20

config class "Priority_down"
        option packetsize  1000
        option avgrate     10

config class "Express"
        option packetsize  1000
        option maxsize     800
        option avgrate     50
        option priority    10

config class "Normal"
        option packetsize  1500
        option packetdelay 100
        option avgrate     10
        option priority    5

config class "Normal_down"
        option avgrate     20

config class "Bulk"
        option avgrate     1
        option packetdelay 200
*** End ***

*bump*

every packet has only one mark value, so if you mark it twice, the second mark will overwrite the first

as for what qos-scripts does, I have no idea, I couldn't get any help or documentation on it, so I just rolled my own

Gents,

For those of you guys who have QoS running, I'm wondering if you can assist me.  QoS just *won't* work on my Kamikaze 7.09 install, and I've traced it to a couple of problems:

1. ipt_limit.o is completely missing
2. As soon as qos-scripts tries to create the tc class, it dies because "hfsc sc rate" completely barfs (due to, I assume, no ipt_limit.o module)

Basically as soon as the root qdisc is created I can get no traffic through

I figure if I can get my hands on ipt_limit.o it might all magically start working.

The discussion might have continued from here.