Ingress classification: dot1p, MPLS traffic-class, and DSCP
7730 SXR platforms support ingress classification using classifier policies that are applied at the subinterface level. Three types of ingress classifier policies are supported: dot1p, MPLS traffic-class, and DSCP policies. All classifier policies contain two basic elements: classification rules and associated actions.
- forwarding class
- profile (for color-aware policing)
- discard eligibility bit
- IP rewrite policy
Classifier policy order of precedence
7730 SXR platforms apply the ingress classifier policies in the following order:
- Default forwarding class and profile settings for the subinterface
- Dot1p policy
- MPLS traffic-class policy
- DSCP policy
If a packet matches a classification rule in each of the above policies, the last matching rule (for example, from the DSCP policy) is applied.
Actions
When a packet matches an ingress classification rule, the classifier policy can assign one or more of the following values to the packet.
-
forwarding class
The forwarding class is identified by the forwarding class name.
-
profile
The profile can be one of the following values:
- exceed
- in
- in-low
- in-plus
- out
- out-low
Nokia recommends the use of the exceed, in, in-plus, or out profiles, which are used as input for color-aware policing at ingress. Post-ingress policing profile values are limited to these four values.
-
IP rewrite policy
The IP rewrite policy provides rules to remark DSCP or IP precedence values based on the profile of the packet. The rewrite policy applies only to IP packets on a Layer 2 or Layer 3 interface.
By default, no IP rewrite policy is applied.
-
de-out-profile
The discard eligiblity (DE) bit setting determines whether the packet is marked as lower priority and can therefore be dropped first when the network experiences congestion.
If a packet's dot1p field has the discard eligibility indicator (DEI) bit set to 1 (true), and the packet matches a classification rule that has the de-out-profile parameter set to true, the profile state for the packet is set to out-low instead of the profile value defined by the rule. The DEI state is maintained through the classification pipeline that allows each rule evaluation to determine the current DEI state for the packet being classified.
Note: A lower precedence level classification rule that sets the profile to out-low based on the de-out-profile true setting is overwritten by any higher precedence matching classification rule that specifies a profile setting. -
default action
If a packet does not match any of the classification rules defined in the classifier policies, the default forwarding class and profile settings under qos interfaces interface <name> input classifiers default are applied to the packet. Unless the default settings are configured otherwise, the default forwarding class is fc0, and the default profile is out.
Dot1p policy
The IEEE 802.1p (dot1p) classifier policy classifies packets based on the 3-bit Priority Code Point (PCP) field in the VLAN tag. The dot1p policy can match traffic based on the dot1p priority value from 0 to 7.
The following table describes which dot1p bits the policies use for classification, depending on the type of encapsulation applied to the subinterface and packet.
Subinterface encapsulation | Packet encapsulation | Dot1p bits used for classification |
---|---|---|
Null | No VLAN tag | None |
Null | Dot1Q | Dot1Q—P-bits |
Null | TopQ/BottomQ | TopQ—P-bits |
Dot1Q | No VLAN tag (default subinterface) | None |
Dot1Q | Do1Q | Dot1Q—P-bits |
QinQ/TopQ | Dot1Q | Dot1Q—P-bits |
QinQ/TopQ | TopQ/BottomQ | TopQ—P-bits |
QinQ/QinQ | TopQ/BottomQ | Determined by the match-qinq-dot1p parameter (under qos interfaces interface <name> input classifiers), which defines whether classification is based on the outer or inner P-bits (default: outer) |
Configuring dot1p classifiers
To configure a dot1p classifier policy, use the qos classifiers dot1p-policy command.
Configure dot1p classifiers
--{ candidate shared default }--[ ]--
# info qos classifiers dot1p-policy dot1p-policy-name dot1p 0
qos {
classifiers {
dot1p-policy dot1p-policy-name {
dot1p 0 {
forwarding-class fc0
profile in
de-out-profile true
ip-rewrite-policy ip-rewrite-name
}
}
}
}
MPLS traffic-class policy
MPLS traffic-class policies classify incoming packets based on the EXP bits of the outer MPLS label.
To provide support for the short-pipe model for MPLS-based aggregation networks, the ler-use-dscp option can overrule the MPLS traffic-class policy. If ler-use-dscp is set to true under the qos interfaces interface <interface-id> input classifiers context, it forces DSCP-based classification for all terminating LSP bindings. This corresponds to the so-called short-pipe model for MPLS based aggregation networks.
Configuring MPLS traffic-class policies
To configure an MPLS traffic-class policy, use the qos classifiers mpls-traffic-class-policy command.
Configure MPLS traffic-class policies
--{ + candidate shared default }--[ ]--
# info qos classifiers mpls-traffic-class-policy mpls-policy-name
qos {
classifiers {
mpls-traffic-class-policy mpls-policy-name {
traffic-class 0 {
forwarding-class fc0
profile in
de-out-profile true
ip-rewrite-policy ip-rewrite-name
}
}
}
}
DSCP policy
DSCP policies classify packets based on the DSCP value of incoming IP packets. If the datapath cannot determine whether the incoming packet is an IP packet (for example on L2 interfaces after parsing subinterface delimiting encapsulation), the DSCP-based classification is skipped.
When a DSCP classifier policy is applied to a subinterface, the policy attempts to match the 6-bit DSCP value in the IP header of incoming packets to one of its entries. If there is a match, the incoming packet is assigned to the specified forwarding class and action.
Configuring DSCP classifiers
To configure a DSCP classifier policy, use the qos classifiers dscp-policy command.
Configure DSCP classifiers
--{ candidate shared default }--[ ]--
# info qos classifiers dscp-policy dscp-policy-name
qos {
classifiers {
dscp-policy dscp-policy-name {
dscp AF11 {
forwarding-class fc0
profile in
de-out-profile true
ip-rewrite-policy ip-rewrite-name
}
}
}
}
Policy application to subinterfaces
7730 SXR platforms perform ingress classification at subinterface level. As a result, classifier policies are applied to individual subinterfaces.
To enable QoS features on a subinterface, you must first configure a custom interface ID using the following command:
qos interfaces interface <interface-id>
You can then associate the custom interface ID with a physical interface and logical subinterface using the following command:
qos interfaces interface <interface-id> interface-ref interface <interface-name> subinterface <subinterface-number>
Where <interface-name> refers to a base interface, such as a port or LAG and <subinterface-number> specifies the subinterface value.
All ingress classifier policies are created in the qos classifiers container. To apply a policy to a subinterface, reference the required policy name under the qos interfaces interface <interface-id> input classifiers context.
Default subinterface policy
By default when a subinterface is created, no classifier policies are assigned. In this case, the default forwarding class and profile values apply (default: fc0 and out).
Applying classifier policies to subinterfaces
To apply classifier policies to a subinterface, use the qos interfaces interface input classifiers command.
If the ler-use-dscp parameter is set to true, it overrules the MPLS traffic-class policy and forces DSCP-based classification for all terminating LSP bindings. The match-qinq-dot1p parameter defines whether classification is based on the outer or inner P-bits (default: outer). And the tos-rewrite-state parameter defines whether a subinterface is considered as trusted or untrusted for the purpose of DSCP remarking.
Apply classifier policies to subinterfaces
--{ + candidate shared default }--[ ]--
# info qos interfaces interface ethernet-1/1.1
qos {
interfaces {
interface ethernet-1/1.1 {
interface-ref {
interface ethernet-1/1
subinterface 1
}
input {
classifiers {
ler-use-dscp true
match-qinq-dot1p outer
tos-rewrite-state trusted
dscp-policy dscp-policy-name
dot1p-policy dot1p-policy-name
mpls-traffic-class-policy mpls-policy-name
}
}
}
}
}
Configuring the default forwarding class and profile
You can configure the default forwarding class and profile for input packets arriving on a subinterface that do not match any classification rule. Unless the default settings are configured otherwise, the default forwarding class is fc0, and the default profile is out.
Configure default forwarding class and profile for a subinterface
--{ candidate shared default }--[ ]--
# info qos interfaces interface eth-1/1.1 input classifiers default
qos {
interfaces {
interface eth-1/1.1 {
input {
classifiers {
default {
forwarding-class test-fc
profile out
}
}
}
}
}
}