I can see qdisc/prio/bfifo filled by datas but can't see any traffic prioritization

Discussion in 'Linux Networking' started by Eric Bart, Nov 11, 2003.

  1. Eric Bart

    Eric Bart Guest

    Hi,

    My gateway server (192.168.0.1) is also a brutal adsl up/downloader.
    I want my local network clients to get though this brute box without
    being slowed.

    I used iptables to mark the packets and a prio root qdisc with
    3 bfifo queues with 3 filters :

    # iptables script on the gateway
    iptables -t mangle -A FORWARD -s 192.168.0.10 -o ppp+ -j MARK --set-mark 5
    iptables -t mangle -A FORWARD -s 192.168.0.11 -o ppp+ -j MARK --set-mark 6
    iptables -t mangle -A OUTPUT -o ppp+ -j MARK --set-mark 7

    # tc script on the gateway
    tc qdisc add dev ppp0 root handle 1: prio
    tc qdisc add dev ppp0 parent 1:1 handle 10: bfifo limit 10000000
    tc qdisc add dev ppp0 parent 1:2 handle 20: bfifo limit 1000
    tc qdisc add dev ppp0 parent 1:3 handle 30: bfifo limit 1000

    tc filter add dev ppp0 protocol ip parent 1:0 prio 1 handle 5 fw flowid 1:1
    tc filter add dev ppp0 protocol ip parent 1:0 prio 1 handle 6 fw flowid 1:2
    tc filter add dev ppp0 protocol ip parent 1:0 prio 1 handle 7 fw flowid 1:3

    -------------

    It seems that the routing works accordingly. See the stats given by :
    iptables -t mangle -L -v --line-numbers
    tc -s -d qdisc show

    Chain FORWARD (policy ACCEPT 878 packets, 654K bytes)
    num pkts bytes target prot opt in out source destination
    1 521 632K MARK all -- any ppp+ bigpc.home anywhere MARK set 0x5
    2 0 0 MARK all -- any ppp+ pthp.home anywhere MARK set 0x6

    Chain OUTPUT (policy ACCEPT 8917 packets, 3253K bytes)
    num pkts bytes target prot opt in out source destination
    1 8507 3210K MARK all -- any ppp+ anywhere anywhere MARK set 0x7

    qdisc bfifo 30: dev ppp0 limit 1000b
    Sent 3209535 bytes 8507 pkts (dropped 0, overlimits 0)

    qdisc bfifo 20: dev ppp0 limit 1000b
    Sent 40 bytes 1 pkts (dropped 0, overlimits 0)

    qdisc bfifo 10: dev ppp0 limit 10000000b # huge queue size !
    Sent 631722 bytes 521 pkts (dropped 0, overlimits 0)

    qdisc prio 1: dev ppp0 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
    Sent 3841297 bytes 9029 pkts (dropped 0, overlimits 0)
    -------------

    However I can't see any speed improvement on the client side. My upload
    traffic is still slowed by the gateway (OUTPUT) traffic.

    Why didn't the prio qdisc block the lower traffic in bfifo 1:3 ???

    Thanks

    PS
    the gateway is running Mandrake 9.2
    iproute2-2.4.7
     
    Eric Bart, Nov 11, 2003
    #1
    1. Advertisements

  2. Eric Bart

    Eric Bart Guest

    OK I gave up the prio qdisc. It works with an htb qdisc.

    But even within the htb qdiscs, i didn't succeed in seing a
    "prio effect" like in :
    tc class add ... classid 1:12 htb ... prio 0
    tc class add ... classid 1:14 htb ... prio 1
     
    Eric Bart, Nov 12, 2003
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.