From: Vadtec <vadtec@vadtec.net>
To: lartc@vger.kernel.org
Subject: [LARTC] tc filter syntax (and general noobness)
Date: Fri, 07 Sep 2007 14:40:51 +0000 [thread overview]
Message-ID: <46E162F3.7010301@vadtec.net> (raw)
Ok,
After much research and e-mails to the list, I'm finally to the point
where I have filtering setup properly.
Now, I'm trying to figure out tc filter so that I can classify packets
on both eth0 and eth1.
So, lets take for example Samba traffic. I want to be sure that its
being sent with relative speed so that my shares don't get lagged. And
what the heck, its as good a place as any to start.
While I understand how to get the protocol number out of the header, I
am having difficulty getting the rest of the field. Mostly, it has to do
with offsets and which uX to use.
So, going off of what I think is correct, I have come up with this:
tc filter add dev eth1 parent 2: protocol ip prio 10 u32 match ip
protocol 6 match u32 0xff534d42 0xffffffff at nexthdr+23 flowid 2:50
I seriously doubt this is the proper way to match a Samba header.
So my question is this. How do I identify where the offset is for a
given header? I assume that (going off the LARTC How To) I can look at
output from wireshark and simply count to the field I am after. (This is
how I figured out that tc filter add dev ppp14 parent 1:0 prio 10 u32
match ip protocol 6 0xff match u8 0x10 0xff at nexthdr+13 flowid X:Y
uses next header+13 to go from the protocol field to the ACK bit for the
flags.)
The thing is. When I run this rule, none of the Samba traffic is being
routed to 2:50... so obviously I'm not going something right.
Thanks for your help,
Vadtec
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next reply other threads:[~2007-09-07 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-07 14:40 Vadtec [this message]
2007-09-07 16:17 ` [LARTC] tc filter syntax (and general noobness) Michal Soltys
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=46E162F3.7010301@vadtec.net \
--to=vadtec@vadtec.net \
--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.