All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin BOIE <util@deuroconsult.ro>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] tc filter oddities
Date: Fri, 31 Oct 2003 08:38:30 +0000	[thread overview]
Message-ID: <marc-lartc-106759066609544@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106758743307068@msgid-missing>

Hi!

> //root limited to 120kbits (on 128kbit link)
> tc qdisc add root dev eth1 handle 1: htb
> tc class add dev eth1 parent 1: classid 1:1 htb rate 120kbit ceil
> 120kbit burst 2k
>
> //first one is voip, second one is everything else
> //this is a change from how i was doing it before and is untested
> tc class add dev eth1 parent 1:1 classid 1:10 htb rate 100kbit ceil
> 120kbit burst 2k prio 1
> tc class add dev eth1 parent 1:1 classid 1:20 htb rate 20kbit ceil
> 120kbit burst 2k prio 2
>
> //3 prio classes for the 'everything else' traffic
> tc class add dev eth1 parent 1:20 classid 1:21 htb rate 40kbit burst 2k
> prio 1
> tc class add dev eth1 parent 1:20 classid 1:22 htb rate 40kbit burst 2k
> prio 2
> tc class add dev eth1 parent 1:20 classid 1:23 htb rate 40kbit burst 2k
> prio 3
>
> //sfq's for the prio classes
> tc qdisc add dev eth1 parent 1:21 handle 121: sfq
> tc qdisc add dev eth1 parent 1:22 handle 122: sfq
> tc qdisc add dev eth1 parent 1:23 handle 123: sfq
>
> //filters - first and second for voip and other
> tc filter add dev eth1 parent 1:0 prio 1 protocol ip u32 match ip src
> 192.168.0.14 flowid 110:
                      ^^^^
I think here is 1:10, right?


> tc filter add dev eth1 parent 1:0 prio 1 protocol ip u32 match ip dst
> 0/0 flowid 1:20

OK, till here.

> //and others are for qos min-delay, empty-ack, and everything else
> tc filter add dev eth1 parent 1:20 pref 2 protocol ip u32 match ip tos
> 0x10 0xff flowid 121:
Here must be 1:21.

> tc filter add dev eth1 parent 1:20 pref 3 protocol ip u32 match ip
> protocol 6 0xff match u8 0x10 0xff at nexthd r+13 match u16 0x0000
> 0xffc0 at 2 flowid 122:
Here must be 1:22.

> tc filter add dev eth1 parent 1:20 pref 4 protocol ip route flowid 123:
Here must be 1:23.

Try this and come back.

>
> ---
> tc -s -d qdisc ls:
>
> qdisc sfq 123: dev eth1 quantum 1514b limit 128p flows 128/1024
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>
> qdisc sfq 122: dev eth1 quantum 1514b limit 128p flows 128/1024
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>
> qdisc sfq 121: dev eth1 quantum 1514b limit 128p flows 128/1024
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>
> qdisc htb 1: dev eth1 r2q 10 default 0 direct_packets_stat 166 ver 3.10
>  Sent 27491 bytes 166 pkts (dropped 0, overlimits 0)
>
> --
> and perhaps more interesting is tc filter show dev eth1 (eth1=upstream)
>
> filter parent 1: protocol ip pref 1 u32
> filter parent 1: protocol ip pref 1 u32 fh 802: ht divisor 1
> filter parent 1: protocol ip pref 1 u32 fh 802::800 order 2048 key ht
> 802 bkt 0 flowid 122:
>   match 00060000/00ff0000 at 8
>   match 00100000/00ff0000 at nexthdr+12
>   match 00000000/0000ffc0 at 0
> filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1
> filter parent 1: protocol ip pref 1 u32 fh 801::800 order 2048 key ht
> 801 bkt 0 flowid 121:
>   match 00100000/00ff0000 at 0
> filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht
> 800 bkt 0 flowid 110:
>   match c0a8000e/ffffffff at 12
> filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht
> 800 bkt 0 flowid 1:20
>   match 00000000/00000000 at 16
>
> (parents = 1: ??!)
>
> Thanks in advance all for your comments on this.
>
> --Justin Whitney
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>

---
Catalin(ux) BOIE
catab@deuroconsult.ro
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2003-10-31  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-31  7:21 [LARTC] tc filter oddities Justin Whitney
2003-10-31  8:38 ` Catalin BOIE [this message]
2003-10-31 23:01 ` Justin Whitney

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-106759066609544@msgid-missing \
    --to=util@deuroconsult.ro \
    --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.