Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Applying 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 Configuration Guide.

    The default MPLS EXP classification table contents are shown in Table 1.

    Table 1: Default MPLS EXP Classification Table

    Forwarding Class

    Loss Priority

    CoS Value

    best-effort

    low

    000

    best-effort

    high

    001

    expedited-forwarding

    low

    010

    expedited-forwarding

    high

    011

    assured-forwarding

    low

    100

    assured-forwarding

    high

    101

    network-control

    low

    110

    network-control

    high

    111

    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:

    1. Filter traffic based on the IP header by including the vrf-table-label statement at the [edit routing-instances routing-instance-name] hierarchy level:
      [edit routing-instances routing-instance-name]vrf-table-label;
    2. Configure a custom MPLS EXP classifier by including the following statements at the [edit class-of-service] hierarchy level:
      [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);}
    3. Configure the routing instance to use the custom MPLS EXP classifier by including the exp statement at the [edit class-of-service routing-instances routing-instance-name classifiers] hierarchy level:
      [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:

    • An enhanced FPC is required.
    • Logical systems are not supported.

    For more details, see the following sections:

    Configuring Global Classifiers and Wildcard Routing Instances

    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]
    routing-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 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 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.

    Examples: Applying MPLS EXP Classifiers to Routing Instances

    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
    

    Published: 2013-02-11