prio fighting
Hi,
I have done this setup to give the machine 192.168.1.4 (masqueraded over dialup) the highest priority:
#! /bin/bash
WHAT="add"
iptables -A PREROUTING -i eth0 -s 192.168.1.1 -t mangle -j MARK --set-mark 1
iptables -A PREROUTING -i eth0 -s 192.168.1.4 -t mangle -j MARK --set-mark 4
tc qdisc $WHAT dev ppp0 root handle 1: prio bands 3 priomap 0 1 2 tc qdisc $WHAT dev ppp0 parent 1:1 handle 2: pfifo limit 1024 tc qdisc $WHAT dev ppp0 parent 1:2 handle 3: pfifo limit 1024 tc qdisc $WHAT dev ppp0 parent 1:3 handle 4: pfifo limit 1024 tc filter add dev ppp0 protocol ip parent 1:0 prio 0 handle 4 fw classid 1:2
tc filter add dev ppp0 protocol ip parent 1:0 prio 2 handle 1 fw classid 1:3
and it is working because form the stats I can see the packets are flowing:
[root@qis /root]# tc -s -r qdisc show dev ppp0 qdisc pfifo 4: limit 1024p
Sent 42374 bytes 804 pkts (dropped 0, overlimits 0)
qdisc pfifo 3: limit 1024p
Sent 16535 bytes 381 pkts (dropped 0, overlimits 0)
qdisc pfifo 2: limit 1024p
Sent 589 bytes 10 pkts (dropped 0, overlimits 0)
qdisc prio 1: bands 3 priomap 0 1 2 2 1 2 0 0 1 1 1 1 1 1 1 1 Sent 59498 bytes 1195 pkts (dropped 0, overlimits 0)
There is just 1 problem, the prioritization is not working. When I start downloading FTP on on the machine 192.168.1.1 , wait 20-30 secs and start another FTP session on 192.168.1.4 it does not gets the full bandwidth as it should get. What could be wrong? One workstation is linux (.1) , other is Win98 (.4), I don't know if this could be the issue.
Thanks in advance
Nikolai
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
Quoted 5 lines · Nikolai Vladychevski
Hi,
I have done this setup to give the machine 192.168.1.4 (masqueraded over dialup) the highest priority:
Quoted 14 lines
#!
/bin/bash
WHAT="add"
iptables -A PREROUTING -i eth0 -s 192.168.1.1 -t mangle -j MARK --set-mark 1
iptables -A PREROUTING -i eth0 -s 192.168.1.4 -t mangle -j MARK --set-mark 4
tc qdisc $WHAT dev ppp0 root handle 1: prio bands 3 priomap 0 1 2 tc qdisc $WHAT dev ppp0 parent 1:1 handle 2: pfifo limit 1024 tc qdisc $WHAT dev ppp0 parent 1:2 handle 3: pfifo limit 1024 tc qdisc $WHAT dev ppp0 parent 1:3 handle 4: pfifo limit 1024 tc filter add dev ppp0 protocol ip parent 1:0 prio 0 handle 4 fw classid 1:2
tc filter add dev ppp0 protocol ip parent 1:0 prio 2 handle 1 fw classid 1:3
Have you tried "classid 2:" and "classid 3:" instead of "classid 1:2" and "classid 1:3"? It would seem to me to work better that way.
Quoted 17 lines
and it is working because form the stats I can see the packets are flowing:
[root@qis /root]# tc -s -r qdisc show dev ppp0 qdisc pfifo 4: limit 1024p
Sent 42374 bytes 804 pkts (dropped 0, overlimits 0)qdisc pfifo 3: limit 1024p
Sent 16535 bytes 381 pkts (dropped 0, overlimits 0)qdisc pfifo 2: limit 1024p
Sent 589 bytes 10 pkts (dropped 0, overlimits 0)qdisc prio 1: bands 3 priomap 0 1 2 2 1 2 0 0 1 1 1 1 1 1 1 1 Sent 59498 bytes 1195 pkts (dropped 0, overlimits 0)
Quoted 6 lines
There is just 1 problem, the prioritization is not working. When I start downloading FTP on on the machine 192.168.1.1 , wait 20-30 secs and start another FTP session on 192.168.1.4 it does not gets the full bandwidth as it should get. What could be wrong? One workstation is linux (.1) , other is Win98 (.4), I don't know if this could be the issue.
I could be the subqueue discipline that you're using. I would think that the tbf queue discipline would be more fair in this situation.
Signature · 7 lines
----------------------------------------------------------------------- Phil Brutsche [email protected] _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/