All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] TC and Diffserv on IPv6
@ 2002-02-25 22:23 Viktor Kemmet
  2002-02-25 23:54 ` bert hubert
  2002-02-26 11:07 ` Viktor.Kemmet
  0 siblings, 2 replies; 3+ messages in thread
From: Viktor Kemmet @ 2002-02-25 22:23 UTC (permalink / raw)
  To: lartc

Hi all,

does somebody have experience with IPv6 traffic control?

I have tried different tools - but, none of them seemed to work the way 
it works with IPv4. Our project, Multi-Media-Conferencing, builds upon 
IPv6 and is intended to use Diffserv for supporting differentiated 
services requirements.
Is that feasible? At the moment we're facing the following problems:

1.) Settings made using tc don't have an effect on IPv6-traffic. (Is it 
due to tc or to the kernel?)

2.) ip6tables does not support the TOS target or equivalent traffic 
class setting.

3.) mgen6 does not support traffic class marking.

4.) ping6 returns the message: "Flowinfo is not supported."


Thanks

viktor



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] TC and Diffserv on IPv6
  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
  1 sibling, 0 replies; 3+ messages in thread
From: bert hubert @ 2002-02-25 23:54 UTC (permalink / raw)
  To: lartc

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.

> 
> 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.

> 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

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
http://www.tk                              the dot in .tk
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] TC and Diffserv on IPv6
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Viktor.Kemmet @ 2002-02-26 11:07 UTC (permalink / raw)
  To: lartc

[-- 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









^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-26 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.