From: Viktor.Kemmet@t-online.de
To: lartc@vger.kernel.org
Subject: Re: [LARTC] TC and Diffserv on IPv6
Date: Tue, 26 Feb 2002 11:07:24 +0000 [thread overview]
Message-ID: <marc-lartc-101472173609436@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101467582319979@msgid-missing>
[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]
bert hubert wrote:
> On Tue, Feb 26, 2002 at 12:28:36AM +0100, Viktor Kemmet
> wrote:
> > Hi all,
> >
> > does somebody have experience with IPv6 traffic
> control?
>
> partly the same thing, partly not.
>
>
> > 1.) Settings made using tc don't have an effect on
> IPv6-traffic. (Is it
> > due to tc or to the kernel?)
>
> tc filter won't currently match ipv6, but tc commands
> will shape *all*
> packets going out.
>
Does that mean, I cannot use the tc filter command with IPv6?
How can I shape without filter?
The attached script "setup-01.tc.sh" works fine with v4. The traffic is
shaped according to the qdisc tbf settings.
With v6 these setting move all packets to the class, the prio-map maps
the Best-Effort traffic to.
Is this because the tc filter on the destination ports already fails?
$TC filter replace $DEV parent 1:0 protocol ip prio 1 u32 \
match ip dport $VIDEO_PORT 0xffff flowid 1:2
> >
> > 2.) ip6tables does not support the TOS target or
> equivalent traffic
> > class setting.
>
> but does it support --mark? If it does so, you can shape
> on that.
Yes, MARK seems to work ("Edge1new.sh").
ip6tables -I OUTPUT -t mangle -p udp --destination-port 5001 \
-j MARK --set-mark 1
ip6tables -L OUTPUT -t mangle
... lists the desired settings. But again
$TC filter add $EGDEV parent 1:0 protocol ip prio 4 handle 1 fw
classid 1:1
does not what it should.
What do you mean by shaping on fw-mark? Is that possible without using
tc filter?
>
> > 3.) mgen6 does not support traffic class marking.
> >
> > 4.) ping6 returns the message: "Flowinfo is not
> supported."
>
> Bug Alexey, i think he will care - tc filter should do
> ipv6.
>
> Regards,
>
> bert
>
viktor
[-- Attachment #2: setup-01.tc.sh --]
[-- Type: text/plain, Size: 2688 bytes --]
TC="tc"
DEV="dev eth0"
efrate="1Mbit ";
afrate1="1Mbit ";
afrate2="1Mbit ";
MTU="1024";
AUDIO_PORT=1516 # Virtual Places Audio data
AUDIO_PORT_CONTROL=1517 # Virtual Places Audio control
VIDEO_PORT=1518 # Virtual Places Video data
VIDEO_PORT_CONTROL=1519 # Virtual Places Video control
TELNET_PORT=23 # Telnet
SSH_PORT=22 # SSH Remote Login Protocol
HTTP_PORT=80 # World Wide Web HTTP
SMTP_PORT=25 # Simple Mail Transfer
FTP_PORT=20 # File Transfer [Default Data]
FTP_PORT_CONTROL=21 # File Transfer [Control]
# Root qdisc of prio type
$TC qdisc del $DEV root
# Four classes are created instantly, for each band one (bands = 4).
$TC qdisc add $DEV handle 1:0 root prio bands 4 \
priomap 1 3 3 3 1 1 0 0 3 2 2 2 2 2 2 2
# priomap 2 3 3 3 1 1 0 0 2 2 2 2 2 2 2 2
# Create Filters for classifying packets by destination-port
# ----------------------------------------------------------------------
# EF: Audio -----------> Band 0 (class 1:1)
$TC filter replace $DEV parent 1:0 protocol ip prio 1 u32 \
match ip dport $AUDIO_PORT 0xffff flowid 1:1
$TC qdisc add $DEV parent 1:1 tbf rate $efrate burst $MTU limit 1.6kB
# ----------------------------------------------------------------------
# AF(1): Video --------> Band 1
$TC filter replace $DEV parent 1:0 protocol ip prio 1 u32 \
match ip dport $VIDEO_PORT 0xffff flowid 1:2
$TC qdisc add $DEV parent 1:2 tbf rate $afrate1 burst $MTU limit 1.6kB
# ----------------------------------------------------------------------
# AF(2): Telnet/HTTP ---> Band 2
$TC filter replace $DEV parent 1:0 protocol ip prio 1 u32 \
match ip dport $TELNET_PORT 0xffff flowid 1:3
$TC filter replace $DEV parent 1:0 protocol ip prio 1 u32 \
match ip dport $HTTP_PORT 0xffff flowid 1:3
$TC qdisc add $DEV parent 1:3 tbf rate $afrate2 burst $MTU limit 1.6kB
# ----------------------------------------------------------------------
# BE: SMTP/FTP --------> Band 3 (class 1:4)
$TC filter replace $DEV parent 1:0 protocol ip prio 1 u32 \
match ip dport $SMTP_PORT 0xffff flowid 1:4
$TC filter replace $DEV parent 1:0 protocol ip prio 1 u32 \
match ip dport $FTP_PORT 0xffff flowid 1:4
$TC qdisc add $DEV parent 1:4 red limit 60KB \
min 15KB max 45KB burst 20 avpkt 1000 bandwidth 1Mbit \
probability 0.4
# ----------------------------------------------------------------------
echo " ------------ QDISC ------------ "
tc -s qdisc ls $DEV
echo " ------------ CLASS ------------ "
tc -s class ls # $DEV
echo " ------------ FILTER ------------ "
tc -s filter ls $DEV
echo " --------------------------------- "
[-- Attachment #3: Edge1new.sh --]
[-- Type: text/plain, Size: 1494 bytes --]
###############################################################################
# DS-marking packets using ip6tables fw-marking
TC=tc
IP=ip
EGDEV="dev eth0"
#
# Flush chain
ip6tables -F OUTPUT -t mangle
# Mark Packets according to destination port number
ip6tables -I OUTPUT -t mangle -p udp --destination-port 5003 -j MARK --set-mark 3
ip6tables -I OUTPUT -t mangle -p udp --destination-port 5002 -j MARK --set-mark 2
ip6tables -I OUTPUT -t mangle -p udp --destination-port 5001 -j MARK --set-mark 1
echo "-------------- ip6tables OUTPUT chain settings ------------"
ip6tables -L OUTPUT -t mangle
echo
# attach a dsmarker
#
$TC qdisc add $EGDEV handle 1:0 root dsmark indices 64 set_tc_index
#
# values of the DSCP to change depending on the class
#
#becomes EF
$TC class change $EGDEV classid 1:1 dsmark mask 0x3 \
value 0xb8
#becomes AF11
$TC class change $EGDEV classid 1:2 dsmark mask 0x3 \
value 0x28
#becomes AF21
$TC class change $EGDEV classid 1:3 dsmark mask 0x3 \
value 0x48
#
#
# The class mapping
#
$TC filter add $EGDEV parent 1:0 protocol ip prio 4 handle 1 fw classid 1:1
$TC filter add $EGDEV parent 1:0 protocol ip prio 4 handle 2 fw classid 1:2
$TC filter add $EGDEV parent 1:0 protocol ip prio 4 handle 3 fw classid 1:3
#
echo "---- qdisc parameters Egress ----------"
$TC qdisc ls $EGDEV
echo "---- Class parameters Egress ----------"
$TC class ls $EGDEV
echo "---- filter parameters Egress ----------"
$TC filter ls $EGDEV parent 1:0
prev parent reply other threads:[~2002-02-26 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-25 22:23 [LARTC] TC and Diffserv on IPv6 Viktor Kemmet
2002-02-25 23:54 ` bert hubert
2002-02-26 11:07 ` Viktor.Kemmet [this message]
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-101472173609436@msgid-missing \
--to=viktor.kemmet@t-online.de \
--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.