When you enable VRF table labels and you do not explicitly apply a classifier configuration to the routing instance, the default MPLS EXP classifier is applied to the routing instance. For detailed information about VRF table labels, see the JUNOS VPNs Configuration Guide.
The default MPLS EXP classification table contents are shown in Table 23.
Table 23: Default MPLS EXP Classification Table
For PICs that are installed on enhanced FPCs, you can override the default MPLS EXP classifier and apply a custom classifier to the routing instance. To do this, perform the following configuration tasks:
- [edit class-of-service]
- classifiers {
-
- exp classifier-name {
- import (classifier-name | default);
-
- forwarding-class class-name {
-
- loss-priority level {
- code-points [ aliases ] [ bit-patterns ];
- }
- }
- }
- }
- forwarding-classes {
- queue queue-number class-name priority (high | low);
- }
- [edit class-of-service routing-instances routing-instance-name classifiers]
- exp classifier-name;
To display the MPLS EXP classifiers associated with all routing instances, issue the show class-of-service routing-instances command.
![]() |
Note: The following caveats apply to custom MPLS EXP classifiers for routing instances:
|
For more details, see the following sections:
To configure a global routing instance classifier, include the all statement at the [edit class-of-service routing-instances] hierarchy level:
- [edit class-of-service routing-instances]
- all {
-
- classifiers {
- exp classifier-name;
- }
- }
For routing instances associated with specific classifiers, the global configuration is ignored.
To use a wildcard in the routing instance classifier configuration, include an asterisk (*) in the name of the routing instance:
- [edit class-of-service routing-instances]
- instance-name* {
-
- classifiers {
- exp classifier-name;
- }
- }
The wildcard configuration follows the longest match. If there is a specific configuration, it is given precedence over the wildcard configuration.
![]() |
Note: Wildcards and the all keyword are supported at the [edit class-of-service routing-instances] hierarchy level but not at the [edit routing-instances] hierarchy level. If you configure a routing instance at the [edit routing-instances] hierarchy level with, for example, the name vpn*, the JUNOS software treats vpn* as a valid and distinct routing instance name. If you then try to apply a classifier to the vpn* routing instance at the [edit class-of-service routing-instances] hierarchy level, the JUNOS software treats the vpn* routing instance name as a wildcard, and all the routing instances that start with vpn and do not have a specific classifier applied receive the classifier associated with vpn*. This same behavior applies with the all keyword. |
Configure a global classifier for all routing instances and override the global classifier for a specific routing instance. In this example, there are three routing instances: vpn1, vpn2, and vpn3, each with VRF table label enabled. The classifier exp-classifier-global is applied to vpn1 and vpn2 (that is, all but vpn3, which is listed separately). The classifier exp-classifier-3 is applied to vpn3.
Configuring a Global Classifier
- [edit routing-instances]
- vpn1 {
- vrf-table-label;
- }
- vpn2 {
- vrf-table-label;
- }
- vpn3 {
- vrf-table-label;
- }
-
- [edit class-of-service routing-instances]
- all {
-
- classifiers {
- exp exp-classifier-global;
- }
- }
- vpn3 {
-
- classifiers {
- exp exp-classifier-3;
- }
- }
Configure a wildcard routing instance and override the wildcard with a specific routing instance. In this example, there are three routing instances: vpn-red, vpn-yellow, and vpn-green, each with VRF table label enabled. The classifier exp-class-wildcard is applied to vpn-yellow and vpn-green. The classifier exp-class-red is applied to vpn-red.
Configuring a Wildcard Routing Instance
- [edit routing-instances]
- vpn-red {
- vrf-table-label;
- }
- vpn-yellow {
- vrf-table-label;
- }
- vpn-green {
- vrf-table-label;
- }
-
- [edit class-of-service routing-instances]
- vpn* {
-
- classifiers {
- exp exp-class-wildcard;
- }
- }
- vpn-red {
-
- classifiers {
- exp exp-class-red;
- }
- }
Display the MPLS EXP classifiers associated with two routing instances:
Monitoring a Configuration
- [edit class-of-service routing-instances]
- vpn1 {
-
- classifiers {
- exp default;
- }
- }
- vpn2 {
-
- classifiers {
- exp class2;
- }
- }
user@host> show class-of-service routing-instances Routing Instance : vpn1
Object Name Type Index
Classifier exp-default exp 8
Routing Instance : vpn2
Object Name Type Index
Classifier class2 exp 57507