Apply 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, Junos applies the default MPLS EXP classifier to the routing instance. For detailed information about VRF table labels, see the Junos OS VPNs Library for Routing Devices.
Table 1 show the default MPLS EXP classification table.
|
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. 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;
}
}
Configure and Apply 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:
Apply 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 you associate with specific classifiers, Junos ignores the global configuration.
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 you include a specific configuration, it has precedence over the wildcard configuration.
Junos supports the wildcard * and the all keyword 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 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, Junos treats the vpn* routing instance
name as a wildcard. Thus 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 is not a stand-alone substitute for the
all keyword.
Apply 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. For this example, we have
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:
Apply Classifiers by Using Wildcard Routing Instances
Configure a wildcard routing instance and override the wildcard with a specific routing instance.
For this example, we have 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:
Verify 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 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.