* Re: [LARTC] howto mark packet's dscp value
2003-03-13 7:56 [LARTC] howto mark packet's dscp value Philip Ho
@ 2003-03-13 8:28 ` Alexander Trotsai
2003-03-13 13:08 ` Maria Joana Urbano
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Alexander Trotsai @ 2003-03-13 8:28 UTC (permalink / raw)
To: lartc
On Thu, Mar 13, 2003 at 03:56:48PM +0800, Philip Ho wrote:
PH>Dear all
PH>can anyone tell me how to mark packet's DSCP value using tc?
You must use iptable not tc
iptable -t mangle -A <chain> <conditions> -s DSCP --set-dscp <num>
--
Best regard, Aleksander Trotsai aka MAGE-RIPE aka MAGE-UANIC
My PGP key at ftp://blackhole.adamant.ua/pgp/trotsai.key[.asc]
Big trouble - user to computer ration too low.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [LARTC] howto mark packet's dscp value
2003-03-13 7:56 [LARTC] howto mark packet's dscp value Philip Ho
2003-03-13 8:28 ` Alexander Trotsai
@ 2003-03-13 13:08 ` Maria Joana Urbano
2003-03-15 1:26 ` Philip Ho
2003-03-17 11:27 ` Maria Joana Urbano
3 siblings, 0 replies; 5+ messages in thread
From: Maria Joana Urbano @ 2003-03-13 13:08 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
>
>can anyone tell me how to mark packet's DSCP value using tc?
>
Hi,
You can use the dsmark qdisc. Something like (example):
tc qdisc add dev $DEV handle 1:0 root dsmark indices 64 set_tc_index
(...)
tc class change $DEV parent 1:0 classid 1:1 dsmark 0x3 value 0xb8 # EF
(...)
tc filter add dev $DEV parent 1:0 prio 4 u32 ip dst y.y.y.y classid 1:1
This way, packets going to y.y.y.y get EF mark.
Iproute2 packages comes with some examples. The "Differentiated Services on
Linux" draft by Almesberger, Jamal and Alexey Kuznetsov is another good
source, including commented and easy to understand examples.
Regards,
Joana Urbano
[-- Attachment #2: Type: text/plain, Size: 169 bytes --]
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25-02-2003
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] howto mark packet's dscp value
2003-03-13 7:56 [LARTC] howto mark packet's dscp value Philip Ho
2003-03-13 8:28 ` Alexander Trotsai
2003-03-13 13:08 ` Maria Joana Urbano
@ 2003-03-15 1:26 ` Philip Ho
2003-03-17 11:27 ` Maria Joana Urbano
3 siblings, 0 replies; 5+ messages in thread
From: Philip Ho @ 2003-03-15 1:26 UTC (permalink / raw)
To: lartc
Dear Joana
I guess dsmark qdisc is runned before iptables PREROUTING phase, right?
Regards,
philip
Maria Joana Urbano wrote:
> >
> >can anyone tell me how to mark packet's DSCP value using tc?
> >
>
> Hi,
>
> You can use the dsmark qdisc. Something like (example):
>
> tc qdisc add dev $DEV handle 1:0 root dsmark indices 64 set_tc_index
> (...)
> tc class change $DEV parent 1:0 classid 1:1 dsmark 0x3 value 0xb8 # EF
> (...)
> tc filter add dev $DEV parent 1:0 prio 4 u32 ip dst y.y.y.y classid 1:1
>
> This way, packets going to y.y.y.y get EF mark.
>
> Iproute2 packages comes with some examples. The "Differentiated Services on
> Linux" draft by Almesberger, Jamal and Alexey Kuznetsov is another good
> source, including commented and easy to understand examples.
>
> Regards,
> Joana Urbano
>
> ------------------------------------------------------------------------
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.459 / Virus Database: 258 - Release Date: 25-02-2003
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] howto mark packet's dscp value
2003-03-13 7:56 [LARTC] howto mark packet's dscp value Philip Ho
` (2 preceding siblings ...)
2003-03-15 1:26 ` Philip Ho
@ 2003-03-17 11:27 ` Maria Joana Urbano
3 siblings, 0 replies; 5+ messages in thread
From: Maria Joana Urbano @ 2003-03-17 11:27 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
Hi Philip,
>I guess dsmark qdisc is runned before iptables PREROUTING phase, right?
>
Hummm, I actually use dsmark after all iptables hooks, at the QoS Egress,
just before the packet leaves the interface (please see KPTD at www.docum.org).
Probably you can do it before the routing code, using the IMQ, but I
haven't try it and I am not sure if this is possible...
Regards,
Joana Urbano
> > >
> > >can anyone tell me how to mark packet's DSCP value using tc?
> > >
> >
> > Hi,
> >
> > You can use the dsmark qdisc. Something like (example):
> >
> > tc qdisc add dev $DEV handle 1:0 root dsmark indices 64 set_tc_index
> > (...)
> > tc class change $DEV parent 1:0 classid 1:1 dsmark 0x3 value 0xb8 # EF
> > (...)
> > tc filter add dev $DEV parent 1:0 prio 4 u32 ip dst y.y.y.y classid 1:1
> >
> > This way, packets going to y.y.y.y get EF mark.
> >
> > Iproute2 packages comes with some examples. The "Differentiated Services on
> > Linux" draft by Almesberger, Jamal and Alexey Kuznetsov is another good
> > source, including commented and easy to understand examples.
> >
> > Regards,
> > Joana Urbano
> >
^ permalink raw reply [flat|nested] 5+ messages in thread