Description

This article explains SRX/J traffic classification based on checking Layer 2 or Layer 3.

Symptoms

Packets entering the device can be classified by an explicit set of configuration statements to place them in certain forwarding classes with a loss priority by checking the Layer 2 (IEEE 802.1p) or Layer 3 (IPv4 precedence, IPv4 DSCP and IPv6 DSCP) CoS bits already set in the headers, as received from the peer devices.


Solution

In specific requirements, when the packets are required to be classified based upon the IEEE  802.1p bits set in a Layer 2 header, the only option is to use the Behavioral Aggregate Classifiers, as Multi-field classifiers do not provide an option to match the IEEE 802.1p bits for classification.


The packets can be classified into required forwarding classes along with the loss priority by using the Behavioral Aggregate Classifiers.

The following section shows a sample configuration for the same :

  1. Configure the ieee-802.1 classifier with the required parameters :

[edit class-of-service]
root# show
classifiers {
    ieee-802.1 L2_test_classifier {
        forwarding-class expedited-forwarding {
            loss-priority low code-points ef;
        }
    }
}

  • Apply the defined classifier on the required interface :

[edit class-of-service interfaces ge-0/0/0 unit 0]
root# show
classifiers {
     ieee-802.1 L2_test_classifier;
}

The above set of statements place the packets in the forwarding class expedited-forwarding with a loss priority of low when the IEEE 802.1p bits correspond to the ef code points.

Sample Output:
root@> show class-of-service classifier type ieee-802.1
Classifier: ieee8021p-default, Code point type: ieee-802.1, Index: 11
Code point Forwarding class Loss priority
000 best-effort low
001 best-effort high
010 expedited-forwarding low
011 expedited-forwarding high
100 assured-forwarding low
101 assured-forwarding high
110 network-control low
111 network-control high

Classifier: L2_test_classifier, Code point type: ieee-802.1, Index: 6748
Code point Forwarding class Loss priority
010 expedited-forwarding low

Related Information