Switches Owner's Manual

Page 16 | AlliedWare™ OS How To Note: Hardware Filters
Appendix A: How to use the layer 4 mask in classifiers
So our biggest block fits into the range 5
1
2-767.
The next second biggest block is
1
28 in our example … it should fit into 384-5
11
.
With these 2 blocks, we cover from 384-767. If we keep repeating the same procedure for
the other blocks, we get the commands in the following table. In some of the cases, the
blocks need to be divided into smaller blocks. In our example, instead of having a single block
of 4, we used 2 x 2 blocks: one at the start (classifier 2) and one at the end (classifier 8).
...
256
384
...
...
-
-
383
511
Port range Number of ports Command
333
334-335
336-35
1
352-383
384-5
11
5
1
2-767
768-775
776-777
1
2
1
6
32
1
28
256
8
2
create class=
1
udpdport=333
create class=2 udpdport=334 l4dmask=FFFE
create class=3 udpdport=336 l4dmask=FFF0
create class=4 udpdport=352 l4dmask=FFE0
create class=5 udpdport=384 l4dmask=FF80
create class=6 udpdport=5
1
2 l4dmask=FF00
create class=7 udpdport=768 l4dmask=FFF8
create class=8 udpdport=776 l4dmask=FFFE
L4 Mask Number of ports
FFFF
1
FFFE 2
FFFC 4
FFF8 8
FFF0
1
6
FFEO 32
FFCO 64
FF80
1
28
FF00 256
FE00 5
1
2
FC00
1
,024
F800 2,048
F000 4,096
E000 8,
1
92
C000
1
6,384
8000 32,768
0000 65,536