Hi,
I am using example 15.8 from the HOWTO.
http://ds9a.nl/lartc/HOWTO//cvs/2.4routing/output/2.4routing-15.html#ss15.8
I have some concerns and a number of easy questions.
1. How do I list the configuration used? (I have included the script below
that was used).
2. How do I backup the configuration - where is it stored?
3. From the example I thought all traffic is going to 1:20 and we manually
direct some traffic to 1:10 (TCP ACK''s, ICMP, TOS 0x10 and UDP). Below
we
can see queue 10 and not 20 is receiving my FTP upload. The FTP is the
only main processes uploading. Can some one please explain whats going on.
Thanks in advance,
Mark
[root@box root]# tc -s qdisc
qdisc sfq 20: dev ppp0 quantum 1500b perturb 10sec
Sent 1437371 bytes 14229 pkts (dropped 0, overlimits 0)
qdisc sfq 10: dev ppp0 quantum 1500b perturb 10sec
Sent 173635397 bytes 162459 pkts (dropped 0, overlimits 0)
backlog 1p
qdisc cbq 1: dev ppp0 rate 10Mbit (bounded,isolated) prio no-transmit
Sent 175075880 bytes 176692 pkts (dropped 0, overlimits 419681)
backlog 1p
borrowed 0 overactions 0 avgidle 624 undertime 0
[root@box root]# tc -s qdisc
qdisc sfq 20: dev ppp0 quantum 1500b perturb 10sec
Sent 1440953 bytes 14284 pkts (dropped 0, overlimits 0)
qdisc sfq 10: dev ppp0 quantum 1500b perturb 10sec
Sent 175462195 bytes 163813 pkts (dropped 0, overlimits 0)
backlog 5p
qdisc cbq 1: dev ppp0 rate 10Mbit (bounded,isolated) prio no-transmit
Sent 176906260 bytes 178101 pkts (dropped 0, overlimits 423273)
backlog 5p
borrowed 0 overactions 0 avgidle 624 undertime 0
[root@box root]# cat qos
#!/bin/bash
# The Ultimate Setup For Your Internet Connection At Home
#
#
# Set the following values to somewhat less than your actual download
# and uplink speed. In kilobits
DOWNLINK=800
UPLINK=240
DEV=ppp0
# clean existing down- and uplink qdiscs, hide errors
tc qdisc del dev $DEV root 2> /dev/null > /dev/null
tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null
###### uplink
# install root CBQ
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit
# shape everything at $UPLINK speed - this prevents huge queues in your
# DSL modem which destroy latency:
# main class
tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit \
allot 1500 prio 5 bounded isolated
# high prio class 1:10:
tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit \
allot 1600 prio 1 avpkt 1000
# bulk and default class 1:20 - gets slightly less traffic,
# and a lower priority:
tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit \
allot 1600 prio 2 avpkt 1000
# both get Stochastic Fairness:
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
# start filters
# TOS Minimum Delay (ssh, NOT scp) in 1:10:
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
match ip tos 0x10 0xff flowid 1:10
# ICMP (ip protocol 1) in the interactive class 1:10 so we
# can do measurements & impress our friends:
tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32 \
match ip protocol 1 0xff flowid 1:10
# UDP
tc filter add dev $DEV parent 1:0 protocol ip prio 14 u32 \
match ip protocol 17 0xff flowid 1:10
# To speed up downloads while an upload is going on, put ACK packets in
# the interactive class:
tc filter add dev $DEV parent 1: protocol ip prio 12 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
# rest is ''non-interactive'' ie ''bulk'' and
ends up in 1:20
tc filter add dev $DEV parent 1: protocol ip prio 13 u32 \
match ip dst 0.0.0.0/0 flowid 1:20