From: gypsy <gypsy@iswest.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Marking packets by mac addr using tc filter u32 match?
Date: Sat, 10 Dec 2005 17:12:18 +0000 [thread overview]
Message-ID: <439B0C72.3AC298BD@iswest.com> (raw)
In-Reply-To: <BAY107-F3151E7335EBD3E34F2786BD5440@phx.gbl>
Juan Pizarro wrote:
>
> Hi
> Is there a way of marking packets by mac address instead of ip or ports
> using a "tc filter u32 match"?
> I read somewhere that I could use the offset -8 and -14 to grab the mac
> addresses but if I use anything lower than -8, for example -9, I get an
> error.
> I'm modifying the wondershaper script to cap the download speed by mac
> address.
>
> Any sugestions?
These work for me. Kernel 2.4.31, iproute2 2.6.10.
INGRESS:
tc filter add dev eth1 parent 1: protocol ip prio 5 u32 match u16 0x0800
0xffff at -2 match u16 0x4455 0xffff at -4 match u32 0x00112233
0xffffffff at -8 flowid 1:40
EGRESS:
tc filter add dev eth1 parent 1: protocol ip prio 5 u32 match u16 0x0800
0xffff at -2 match u32 0x22334455 0xffffffff at -12 match u16 0x0011
0xffff at -14 flowid 1:40
--
gypsy
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2005-12-10 17:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-10 1:07 [LARTC] Marking packets by mac addr using tc filter u32 match? Juan Pizarro
2005-12-10 17:12 ` gypsy [this message]
2005-12-11 7:46 ` brick
2005-12-11 8:28 ` Lee Sanders
2005-12-12 10:19 ` Kristiadi Himawan
2005-12-12 14:44 ` gypsy
2005-12-13 2:27 ` Kristiadi Himawan
2005-12-13 10:17 ` Michael Davidson
2005-12-13 10:50 ` Kristiadi Himawan
2005-12-13 15:04 ` gypsy
2005-12-15 14:45 ` gypsy
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=439B0C72.3AC298BD@iswest.com \
--to=gypsy@iswest.com \
--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