Allied Telesis x900-24 series manual Example 1 ports, Points to remember

Page 14

Appendix A: How to use the layer 4 mask in classifiers

Example 1: ports 2000-2003

Let’s say we want to have a UDP port range of 2000-2003, then the mask we need to have is:

2000

=

00010011 10001100

2001

=

00010011 10001101

2002

=

00010011 10001110

2003

=

00010011 10001111

The changed bits from 2000-2003 are bolded. We must now write a L4 mask which will meet these requirements. The easiest way to do is, we must set the changed bits (between 2000 and 2003) in the mask to 0. In our example, they are the last 2 bits. So our mask should be:

2000

=

00010011 10001100

2001

=

00010011 10001101

2002

=

00010011 10001110

2003

=

00010011 10001111

L4 Mask

=

11111111 11111100

We must convert the binary number of 11111111 11111100 to hex, which ends in FF FC.

The classifier for UDP destination ports between 2000-2003 should be:

Create class=1 udpdp=2000 l4dmask=FFFC

Points to remember

In our first example we choose a starting port number in which the last 2 bits were 0 and also choose the number of the ports as 4 (power of 2) to simplify the example.

Before going into the complex examples, there are some points to remember for the L4 mask calculation:

zif the beginning port is an odd number (last bit 1), to cover a range of ports, you will need an extra 1 classifier compared to the even-beginning ports.

zyou can easily calculate the total number of ports in a mask by using the formula 2x (where x is the number of the 0's at the end of the mask). For example, a mask of 1111111111111000 will cover a range of 23 = 8 ports.

zDivide the total number of the ports you want to cover into a sum of powers of 2. For example, a range of 77 ports could be divided into:

64 + 8 + 4 + 1 =77

This shows us that a group of 77 ports could be covered by a minimum of 4 classifiers.

Page 14 AlliedWare™ OS How To Note: Hardware Filters

Image 14
Contents AlliedWareTM OS IntroductionWhat information will you find in this document? This document contains the followingConfiguring packet classification Creating dedicated hardware filtersCustomer port Configuring inner parameters for nested VLANsCore port 1st tag 2nd tag Nested VLANs disabled 1st tagFor example, imagine you have the following set of filters Then, enter the following commandCreating hardware filters Logic of the operation of the hardware filters Effects of the action parametersFilter rules table Combining hardware filters and QoSHow many filters can you create? Extra rules used when combining QoS and hardware filters Rule Empty Rule tableRule Profile maskFollowing figure shows the copies of these rules Are there enough bytes for your set of filters? Okay length For example, this set of filters would work Disabled by defaultSome protocols also use filters, so use some of the length How to see the current filter resource usage on the switch Binary Appendix a How to use the layer 4 mask in classifiersDefault mask 07D0 in hexadecimalExample 1 ports Points to rememberNow it is really easy to write the classifiers Example 2 portsExample 3 ports 512 128256 024Following table shows the port ranges for the largest blocks 65536C613-16058-00 REV C