From: Franck BALAZOT <fbalazot@aeta.fr>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] CBQ: U32 selector question : filtering all the port > a
Date: Mon, 16 Jul 2001 08:01:54 +0000 [thread overview]
Message-ID: <marc-lartc-99527055913996@msgid-missing> (raw)
In-Reply-To: <marc-lartc-99501687806917@msgid-missing>
Finaly I tried to filter port > 32768 (bit 15=1 : 0x8000)
with :
tc filter add dev eth0 parent 10;10 protocol ip prio 100 u32 match ip
sport 0x8000 0x8000 flowid 10:100
It seems to work fine, but I need to do more tests.
Nikolai Vladychevski wrote:
> Franck BALAZOT wrote:
> >
> > Hi all,
> >
> > I saw that the u32 selector can match a PATTERN so I can use it to
> > filter on a port value like :
> >
> > tc filter add dev eth0 parent 10;10 protocol ip prio 100 u32 match ip
> > sport 0x0014 0xffff flowid 10:100
> >
> > (filter on the ftp-data (20) source port)
> >
> > But is there a method to filter all the source ports > 40000 for example
> > ?
> >
>
> 40,000 into HEX will be 0x9c40
> converting into binary it will be 1001110001000000
>
> you have to use the mask to match only the highest 10 bits, so in binary
> it will be 1111111111000000 wich in HEX will be 0x03ff , that's your
> mask.
>
> finaly it will be:
> tc filter add dev eth0 parent 10;10 protocol ip prio 100 u32 match ip
> sport 0x0000 0x03ff flowid 10:100
>
> well, but that's the theory, i never tried it, can you test it and reply
> me back if it did work or not?
>
> thanks
> nikolai
--
------------------------------------------------
Franck BALAZOT (fbalazot@aeta.fr)
AETA.COM
361, Avenue du Général De Gaulle
92140 CLAMART
FRANCE
Tél:01.41.36.12.93
------------------------------------------------
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
prev parent reply other threads:[~2001-07-16 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-13 9:33 [LARTC] CBQ: U32 selector question : filtering all the port > a value Franck BALAZOT
2001-07-16 8:01 ` Franck BALAZOT [this message]
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-99527055913996@msgid-missing \
--to=fbalazot@aeta.fr \
--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.