Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: "yuxiao" <yxjia@site.uottawa.ca>
To: lartc@vger.kernel.org
Subject: [LARTC] question about ingress police
Date: Sun, 02 Feb 2003 00:31:06 +0000	[thread overview]
Message-ID: <marc-lartc-104414586525309@msgid-missing> (raw)

Hi stef and all

I want measure the policy perfomance for video traffic on mpls diffserv
network. there are two different polices for video packet
1.      Video packets that are marked that are over the limit are to be
rejected at the edge router.
2.    Video packets that are marked that are over the limit are to be
downgraded as best effort and are sent through.

Before video enter my mpls diffserv backbone, I already mark to EF class.
when video come to edge router, if its rate over limit, either dropped , or
downgraded to BE taffic
I plan use the ingress qdisc, but confused something parmeter

For policy 1,  a part of script follow
#! /bin/sh -x

TC=/usr/local/bin/tc
INDEV=eth0
EGDEV="dev eth1"

# tag video traffic from 172.16.40.3 to value 1, tag other traffic from
# 172.16.40.5 to value 2
iptables -A input -i $INDEV -s 172.16.40.3 -m 1
iptables -A input -i $INDEV -s 172.16.40.5 -m 2

# install the ingress qdisc on the ingress interface
$TC qdisc add dev $INDEV handle ffff: ingress

# police for video traffic
$TC filter add dev $INDEV parent ffff: protocol ip prio 50 handle 1 fw \
 police rate 4Mbit  burst 200k drop  flowid :1


######################## Egress side ########################

# attach a dsmarker
$TC qdisc add $EGDEV handle 1:0 root dsmark indices 64

#EF
$TC class change $EGDEV classid 1:1 dsmark mask 0x3 \
       value 0xb8

#BE
$TC class change $EGDEV classid 1:2 dsmark mask 0x3 \
       value 0x0
#
#
# The class mapping using fwmark
#
$TC filter add $EGDEV parent 1:0 protocol ip prio 1 handle 1 fw classid 1:1
$TC filter add $EGDEV parent 1:0 protocol ip prio 1 handle 2 fw classid 1:2

Question for this line
"$TC filter add dev $INDEV parent ffff: protocol ip prio 50 handle 1 fw \
 police rate 4Mbit  burst 200k drop  flowid :1"
does it mean if video traffic rate over 4Mbit, will be dropped. and normal
video traffic (not exceed limit) will be put into flow, flowid :1(1  meas
tcindex), am I right?

For policy 2 ,how can I remark overlimited packet to BE, I try

#
$TC filter add dev $INDEV parent ffff: protocol ip prio 50 handle 1 fw \
 police rate 4Mbit  burst 200k continue  flowid :2  (assume BE)

$TC filter add dev $INDEV parent ffff: protocol ip prio 50 handle 1 fw \
 police rate 4Mbit  burst 200k drop  flowid :1  (asume EF)

# map to classing using tcindex

$TC filter add $EGDEV parent 1:0 protocol ip prio 1 handle 1 tcindex classid
1:1
$TC filter add $EGDEV parent 1:0 protocol ip prio 1 handle 2 tcindex classid
1:2

Question for this line
"$TC filter add dev $INDEV parent ffff: protocol ip prio 50 handle 1 fw \
 police rate 4Mbit  burst 200k continue  flowid :2  "
does it mean if packet over limit will pass througn to tcindex 2 (later map
to BE)???

Thanks for help

yuxiao



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

                 reply	other threads:[~2003-02-02  0:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-104414586525309@msgid-missing \
    --to=yxjia@site.uottawa.ca \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox