Traffic Classification rules allow you to assign VLAN membership and/or class of service to your network traffic based on the traffic's classification type. Classification types are derived from Layers 2, 3, and 4 of the OSI model, and all network traffic can be classified according to specific layer 2/3/4 information contained in each frame. In Policy Manager, rules are used to provide four key policy features: traffic containment, traffic filtering, traffic security, and traffic prioritization. Examples of how to design rules for each of these features are given below.
A Traffic Classification rule has two main parts: Traffic Description and Actions. The Traffic Description identifies the traffic classification type for the rule. The Actions specify whether traffic matching that classification type will be assigned VLAN membership, class of service, or both. When a frame arrives on a port, the switch checks to see if the frame's classification type matches the type specified in a rule. If it does, then the actions defined in that rule will apply to the frame. Use the Policy Manager's Rule Wizard to quickly and easily create a rule and define its traffic description and actions.
In Policy Manager, rules are created and then grouped together into Services, which are then used to define roles. A role is assigned to each port either through end user authentication or as the port's default role. This means that there can be multiple rules active on a port. When a frame is received on a port, if the frame's classification type matches more than one rule, classification precedence rules are used to determine which rule to use.
The following information is discussed in this file:
Classification types are grouped according to Layers 2, 3, and 4 of the OSI model and there are multiple classification types for each layer.
| OSI Model |
|---|
| Layer 7 - Application |
| Layer 6 - Presentation |
| Layer 5 - Session |
| Layer 4 - Transport |
| Layer 3 - Network |
| Layer 2 - Data Link |
| Layer 1 - Physical |
Specific Layer 2/3/4 information contained in the header of each frame is used to identify the frame's classification type. Each layer uses different information to classify frames.
For example, a network administrator could use rules to separate end-user traffic into VLANs according to protocol, subnet, or application. Rules could also be used to group geographically separate end systems into job specific workgroups.
Priority is a value between 0 and 7 assigned to each frame as it is received on a port, with 7 being the highest priority. Frames assigned a higher priority will be transmitted before frames with a lower priority. Each of the priorities is mapped into a specific transmit queue by the switch or router. The insertion of the priority value (0-7) allows all 802.1Q devices in the network to make intelligent forwarding decisions based on its own level of support for prioritization.
Policy Manager enables you to utilize priority by creating classes of service that each include an 802.1p priority, and optionally an IP type of service (ToS/DSCP) value, rate limits, and transmit queue configuration. You can then assign the class of service as a classification rule action, as part of the definition of an automated service, or as a role default. See Getting Started with Class of Service for more information.
Layer 2 classification types allow you to define classification rules based on an exact match of the MAC address or specific protocol type of each frame.
| IP | 0x0800 |
| ARP | 0x0806 |
| Reverse ARP | 0x8035 |
| Novell IPX 1 | 0x8137 |
| Novell IPX 2 | 0x8138 |
| Banyan | 0x0bad |
| AppleTalk | 0x809b |
| AppleTalk ARP | 0x80f3 |
| Decnet Phase 4 | 0x6003 |
| IP | 0x0606 |
| IPX | 0xe0e0 |
| NetBIOS | 0xf0f0 |
| Banyan Vines | 0xbcbc |
| SNA | 0x0404 |
| SNAP | 0xAAAA |
| Other | a two-byte value |
Type of Service can be used by applications to indicate priority and Quality of Service for each frame. The level of service is determined by a set of service parameters which provide a three way trade-off between low-delay, high-reliability, and high-throughput. The use of service parameters may increase the cost of service. In many networks, better performance for one of these parameters is coupled with worse performance on another. Except for very unusual cases, at most, two of the parameters should be set.
For a ToS value, the 8-bit hexadecimal number breaks down as follows:
| Bits 0-2: Precedence |
| Bit 3: 0=Normal Delay, 1=Low Delay |
| Bit 4: 0=Normal Throughput, 1=High Throughput |
| Bit 5: 0=Normal Reliability, 1=High Reliability |
| Bits 6-7: Explicit Congestion Notification |
The precedence bits (bits 0-2) break down as follows:
| 111 - Network Control |
| 110 - Internetwork Control |
| 101 - CRITIC/ECP |
| 100 - Flash Override |
| 011 - Flash |
| 010 - Immediate |
| 001 - Priority |
| 000 - Routine |
The Network Control precedence designation is intended to be used within a network only. The actual use and control of that designation is up to each network. The Internetwork Control designation is intended for use by gateway originators only.
For a DSCP value, the value represents codepoints for two Differentiated Services (DS) Per-Hop-Behavior (PHB) groups called Expedited Forwarding (EF) and Assured Forwarding (AF). For more information on these PHB groups, refer to RFC 2597 and RFC 2598.
For information on how to automatically generate a ToS or DSCP value, see ToS/DSCP Configuration window.
| TIP: | You can define a new IP Protocol Type using the
Pre-Defined
Well-Known IDs window.
Once defined, it is available for
selection from the list of well-known values when defining the rule's traffic
classification type. |
|---|
| ICMP | 1 |
| IGMP | 2 |
| TCP | 6 |
| EGP | 8 |
| UDP | 17 |
| IPv6 | 41 |
| RSVP | 46 |
| GRE | 47 |
| ESP | 50 |
| AH | 51 |
| EIGRP | 88 |
| OSPF | 89 |
| PIM | 103 |
| VRRP | 112 |
| L2TP | 115 |
| Other | 0-255 |
| TIP: | You can define a new value for a UDP or TCP port number using the
Pre-Defined
Well-Known IDs window.
Once defined, it is available for
selection from the list of well-known values when defining the rule's traffic
classification type. |
|---|
| FTP Data | 20 |
| FTP | 21 |
| SSH | 22 |
| Telnet | 23 |
| SMTP | 25 |
| TACACS | 49 |
| DNS | 53 |
| BootP Server | 67 |
| BootP Client | 68 |
| TFTP | 69 |
| Finger | 79 |
| HTTP | 80 |
| POP3 | 110 |
| Portmapper | 111 |
| NNTP | 119 |
| NTP | 123 |
| NetBIOS Name Service | 137 |
| NetBIOS Datagram Service | 138 |
| NetBIOS Session Service | 139 |
| IMAP2/IMAP4 | 143 |
| SNMP | 161 |
| IMAP3 | 220 |
| LDAP | 389 |
| HTTPS | 443 |
| R-Exec | 512 |
| R-Login | 513 |
| R-Shell | 514 |
| LPR | 515 |
| RIP | 520 |
| SOCKS | 1080 |
| Citrix ICA | 1494 |
| RADIUS | 1812 |
| RADIUS Accounting | 1813 |
| NFS | 2049 |
| X11 (Range Start) | 6000 |
| X11 (Range End) | 6063 |
| Other | 0-65535 |
| Hello/SAP | 0 |
| RIP | 1 |
| Echo Packet | 2 |
| Error Packet | 3 |
| NetWare 386 | 4 |
| SeqPackProt | 5 |
| NetWare 286 | 17 |
| Other | 0-31 |
| NCP | 1105 |
| SAP | 1106 |
| RIP | 1107 |
| NetBIOS | 1109 |
| Diagnostics | 1110 |
| NSLP | 36865 |
| IPX Wan | 56868 |
| Other | 0-65535 |
| Echo Reply | 0 |
| Destination Unreachable | 3 |
| Source Quench | 4 |
| Redirect | 5 |
| Echo | 8 |
| Router Advertisement | 9 |
| Router Solicitation | 10 |
| Time Exceeded | 11 |
| Parameter Problem | 12 |
| Timestamp | 13 |
| Timestamp Reply | 14 |
| Information Request | 15 |
| Information Reply | 16 |
| Address Mask Request | 17 |
| Address Mask Reply | 18 |
Note: The Matrix product line does not support Layer 4 classification for IP frames that have been fragmented, as the Layer 4 information is not present in these frames. If a Matrix device has an FDDI HSIM installed, Layer 4 classification will not be supported for any frames larger than 1500 bytes. Frames larger than 1500 bytes are fragmented internally in the switch. When creating classification rules based on specific Layer 4 information, using the IP Fragment classification rule will allow fragmented frames to be classified according to the Layer 4 information contained in the original frame.
| TIP: | You can define a new value for a UDP port number using the
Pre-Defined
Well-Known IDs window.
Once defined, it is available for
selection from the list of well-known values when defining the rule's traffic
classification type. |
|---|
| FTP Data | 20 |
| FTP | 21 |
| SSH | 22 |
| Telnet | 23 |
| SMTP | 25 |
| TACACS | 49 |
| DNS | 53 |
| BootP Server | 67 |
| BootP Client | 68 |
| TFTP | 69 |
| Finger | 79 |
| HTTP | 80 |
| POP3 | 110 |
| Portmapper | 111 |
| NNTP | 119 |
| NTP | 123 |
| NetBIOS Name Service | 137 |
| NetBIOS Datagram Service | 138 |
| NetBIOS Session Service | 139 |
| IMAP2/IMAP4 | 143 |
| SNMP | 161 |
| IMAP3 | 220 |
| LDAP | 389 |
| HTTPS | 443 |
| R-Exec | 512 |
| R-Login | 513 |
| R-Shell | 514 |
| LPR | 515 |
| RIP | 520 |
| SOCKS | 1080 |
| Citrix ICA | 1494 |
| RADIUS | 1812 |
| RADIUS Accounting | 1813 |
| NFS | 2049 |
| X11 (Range Start) | 6000 |
| X11 (Range End) | 6063 |
| Other | 0-65535 |
| TIP: | You can define a new value for a TCP port number using the
Pre-Defined
Well-Known IDs window.
Once defined, it is available for
selection from the list of well-known values when defining the rule's traffic
classification type. |
|---|
| FTP Data | 20 |
| FTP | 21 |
| SSH | 22 |
| Telnet | 23 |
| SMTP | 25 |
| TACACS | 49 |
| DNS | 53 |
| BootP Server | 67 |
| BootP Client | 68 |
| TFTP | 69 |
| Finger | 79 |
| HTTP | 80 |
| POP3 | 110 |
| Portmapper | 111 |
| NNTP | 119 |
| NTP | 123 |
| NetBIOS Name Service | 137 |
| NetBIOS Datagram Service | 138 |
| NetBIOS Session Service | 139 |
| IMAP2/IMAP4 | 143 |
| SNMP | 161 |
| IMAP3 | 220 |
| LDAP | 389 |
| HTTPS | 443 |
| R-Exec | 512 |
| R-Login | 513 |
| R-Shell | 514 |
| LPR | 515 |
| RIP | 520 |
| SOCKS | 1080 |
| Citrix ICA | 1494 |
| RADIUS | 1812 |
| RADIUS Accounting | 1813 |
| NFS | 2049 |
| X11 (Range Start) | 6000 |
| X11 (Range End) | 6063 |
| Other | 0-65535 |
The figure above shows a configuration where the network administrator wants to separate end-user traffic into VLANs based on the assigned IP subnet of each department. This can easily be accomplished by creating two Layer 3 classification rules based on the IP subnet range of the respective departments.
Rule 1 - Engineering, which uses the 132.181.28.x subnet, will be assigned to the Red VLAN.
Rule 2 - Sales, which uses the 132.181.29.x subnet, will be assigned to the Blue VLAN.
Based on these two Layer 3 classification rules, the traffic from the Engineering VLAN will be isolated from the Sales VLAN. Since these rules are based on Layer 3 information, an Engineering user could enter the network from a connection in the Sales department, and that user would still be contained in the Engineering VLAN.
In filtering operations, the traffic to be filtered is assigned to the Discard VLAN. Since the Discard VLAN is not configured to exit the switch, the traffic will be discarded.
The figure above shows a common configuration in which a routed backbone is using both RIP and OSPF for its routing protocols. The network administrator does not want the multicast OSPF and broadcast RIP frames propagated to the end stations. The network is designed so that only end users are attached to the Matrix devices.
To implement filtering in this scenario, a Layer 3 rule and a Layer 4 rule will be created.
Rule 1 (Layer 3) - Any frame received with an IP Protocol Type of 89 (OSPF) will be classified into the Discard VLAN.
Rule 2 (Layer 4) - Any frame received with a Bilateral UDP port number of 520 (RIP) will be classified into the Discard VLAN.
Based on this configuration, as long as the Discard VLAN is not configured to exit the switch, all RIP and OSPF frames will be filtered from the end users.
In the figure above, the network components include a router and a Matrix E7. In this configuration end-users connect to the ports of the Matrix E7.
Since the end-users would never need to communicate directly to the router using the router's IP address, a Layer 3 IP classification rule will be used.
Rule - Any frames received by the switch with a destination IP address of the router (129.168.1.2) will be classified to the Discard VLAN. The Discard VLAN is configured so that it does not exit the switch.
The end result is that any frames from a user trying to "hack" into the router will be discarded before ever reaching the router.
To accomplish the prioritization goals in this example, there are two main steps required: creating the classification rules, and then configuring the priority-to-transmit queue mapping for the switch, if needed.
First, create one Layer 3 and two Layer 4 classification rules.
Rule 1, Layer 3 (SAP R/3) - All frames to or from the IP address of the SAP R/3 server will be tagged with a priority indicator of 7 (highest).
Rule 2, Layer 4 (Web) - All frames with a UDP port number of 80 (HTTP) will be tagged with a priority indicator of 5.
Rule 3, Layer 4 (email) - All frames with a UDP port number of 25 (SMTP) will be tagged with a priority indicator of 3.
Note: An IP address classification was selected for Rule 1 because it has been observed that SAP R/3 dynamically negotiates the TCP/UDP port used, so the port number selections vary from session to session. If this was not the case, a Layer 4 UDP classification could be used.
Then, configure the priority-to-transmit queue mappings. Each switch has default priority-to-transmit queue mappings. You can use these defaults or change the mappings using local management or NetSight Atlas Console. In addition, Policy Manager provides the ability to configure transmit queues as part of the Role-Based Rate Limits and Transmit Queue Configuration class of service mode. This functionality is available only on certain devices such as the Matrix N-Series Gold and Platinum devices (refer to the Firmware Feature Support tables in the release notes for specific device/firmware rate limit support).
Based on the default priority-to-traffic queue mapping for a Matrix E7, the priorities assigned above will work out so that each frame classification type will be mapped to the desired traffic queue. This means that no user configuration of the priority-to-transmit queue mapping would be required.
With the classification rules described above, the network traffic would be prioritized as shown in the table below:
| Application | Classification Type | Desired Priority | Priority Value | Matrix E7 Traffic Queue |
|---|---|---|---|---|
| SAP R/3 | Bilateral IP | High | 7 | 3 |
| Web | UDP Port Number | Medium | 5 | 2 |
| UDP Port Number | Low | 3 | 1 |
The device determines the order of precedence based on the classification types. The Precedence Table details the order of precedence with 1 being the highest precedence, and 15 being the lowest.
| Classification | Precedence |
|---|---|
| Layer 2 | |
| Source MAC Address | 1 |
| Destination MAC Address | 2 |
| Ethertype Field / DSAP/SSAP Fields | 13 |
| Layer 3 | |
| IP ToS / IPX CoS | 11 |
| IP Protocol Type / IPX Packet Type | 12 |
| Source IP Address Exact Match / Source IPX Network Number | 3 |
| Source IP Address Best Match / Destination IPX Network Number | 4 |
| Destination IP Address Exact Match | 5 |
| Destination IP Address Best Match | 6 |
| IP Fragment | 7 |
| Layer 3/4 | |
| IPX Socket Source / UDP Source Port / TCP Source Port | 8 |
| IPX Socket Destination / UDP Destination Port / TCP Destination Port | 9 |
| ICMP | 10 |
| VLAN ID | 14 |
| Priority | 15 |
Exact Match indicates a match of an explicitly defined address.
Best Match indicates a match of an entire subnet, or range within a subnet.
Note: The precedence of a rule based on a bilateral address match is determined frame by frame depending on whether the rule matches the destination or source address in the frame. A bilateral address rule which matches the source address has higher precedence than a rule which matches a destination address (or any other lower precedence rule).
Rule 1- All frames with a UDP port number of 55(ISI Graphic Language) are assigned to the Red VLAN.
Rule 2- All frames sourced from the 132.181.28.x subnet are assigned to the Blue VLAN.
If a frame is received with a source address of 132.181.28.99 and a UDP port number of 55, the frame will be assigned to the Blue VLAN because as shown in the Precedence Table, a Layer 3 IP Address rule takes precedence over a Layer 4 rule.
Rule 1- All frames with an IP ToS value of AA are assigned a priority of 7.
Rule 2- All frames with a TCP port number of 80 (HTTP) are assigned a priority of 3.
If a frame is received with a ToS value of AA and a TCP port number of 80, the frame will be assigned a priority of 3, because as shown in the Precedence Table, TCP port number classifications take precedence over IP ToS classifications.