All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Beck <wilson99@lineone.net>
To: lartc@vger.kernel.org
Subject: [LARTC] u32 filters dont appear to work
Date: Sat, 16 Feb 2002 16:11:59 +0000	[thread overview]
Message-ID: <marc-lartc-101387591525724@msgid-missing> (raw)

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€0
UPLINK$0
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





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

             reply	other threads:[~2002-02-16 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-16 16:11 Mark Beck [this message]
2002-02-16 16:19 ` [LARTC] u32 filters dont appear to work bert hubert
2002-02-16 16:50 ` Mark Beck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-101387591525724@msgid-missing \
    --to=wilson99@lineone.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.