Applying MPLS EXP Classifiers to Routing Instances
This topic shows how to apply MPLS EXP classifiers to routing instances.
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 OS VPNs Library for Routing Devices.
The default MPLS EXP classification table contents are shown in Table 1.
MPLS EXP Bits |
Forwarding Class |
Loss Priority |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
At times you might need to maintain the original classifier—for example with bridge
domains, where you neither want to configure a custom classifier for the routing
instance nor accept the default classifier, which would override the original
classifier. Starting with Junos OS Release 16.1, on MX Series devices only, you can
maintain the original MPLS EXP classifier. To do so, apply the
no-default
option for the routing instance. For example:
[edit class-of-service] routing-instances routing-instance-name { classifiers { no-default; } }
Configuring and Applying Custom MPLS EXP Classifiers to Routing Instances
For routing instances with VRF table labels enabled, you can override the default MPLS EXP classifier and apply a custom classifier to a routing instance.
The following procedure requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To apply a custom classifier to a routing instance:
Applying Global Classifiers and Wildcard Routing Instances
To apply a classifier to all routing instances:
Specify that the MPLS EXP classifier is for all routing instances.
[edit class-of-service ] user@host# set routing-instances all classifiers exp classifier-name
For routing instances associated with specific classifiers, the global configuration is ignored.
To use a wildcard to apply a classifier to all routing instances:
Include an asterisk (*) in the name of the routing instance.
[edit]] user@host# edit class-of-service routing-instances routing-instance-name* user@host# set 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.
The wildcard * 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*
, Junos OS 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 OS treats the vpn*
routing instance name as a wildcard, and all 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.
Note that the * wildcard must be appended to an instance name at these configuration levels. The * wildcard should not be intended as a stand-alone substitute for the all
keyword.
Applying Global MPLS EXP Classifiers to Routing Instances
This example shows how to apply a global classifier to all routing instances and then 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
.
The following procedure requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure a global classifier for all routing instances and override the global classifier for a specific routing instance:
Applying Classifiers by Using Wildcard Routing Instances
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
.
The following procedure requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure a wildcard routing instance and override the wildcard with a specific routing instance:
Verifying the Classifiers Associated with Routing Instances
Purpose
Display the MPLS EXP classifiers associated with two routing instances:
Action
To verify the MPLS EXP classifiers associated with two routing instances, enter the following Junos OS CLI operational mode command:
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
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.