MPLS QoS configuration

Configuring MPLS traffic-class policy

To reference a forwarding-class in any QoS policy, the forwarding-class must first be explicitly mapped to an output queue. For information about mapping the named forwarding classes to named queues, see Named queues and forwarding classes.

To configure an MPLS traffic-class policy, map one or more traffic-class values to the desired forwarding-class and drop-probability values using the qos classifiers mpls-traffic-class-policy command.

The following example creates an MPLS traffic-class policy:

--{ candidate shared default }--[  ]--
# info qos classifiers    
    qos {
        classifiers {
            mpls-traffic-class-policy mpls-policy-1 {
                traffic-class 7 {
                    forwarding-class fc7
                    drop-probability medium
                }
            }
        }
    }

Applying MPLS traffic-class policy to input traffic

To apply an MPLS traffic-class policy to input traffic on a subinterface, specify the desired mpls-traffic-class-policy using the qos interfaces interface input classifiers command.

The following example applies an MPLS traffic-class policy to inbound traffic on a subinterface.

--{ candidate shared default }--[  ]--
# info qos interfaces interface ethernet-1/1
    qos {
        interfaces {
            interface ethernet-1/1 {
                interface-ref {
                    interface ethernet-1/1 
                    subinterface 1
                }
                input {
                    classifiers {
                        mpls-traffic-class-policy mpls-policy-1
                    }
                }
            }
        }
    }

Configuring MPLS rewrite rules

To reference a forwarding-class in any QoS policy, the forwarding-class must first be explicitly mapped to an output queue. For information about mapping the named forwarding classes to named queues, see Named queues and forwarding classes.

To configure an MPLS rewrite-rule policy, map one or more forwarding classes to the desired traffic-class using the qos rewrite-rules mpls-traffic-class-policy command.

The following example creates an MPLS rewrite-rule policy:

--{ candidate shared default }--[  ]--
# info qos rewrite-rules
    qos {
        rewrite-rules {
            mpls-traffic-class-policy mpls-rewrite-2 {
                map fc7 {
                    traffic-class 7
                }
            }
        }
    }

Applying MPLS rewrite rules to output traffic

To apply an MPLS rewrite rule policy to output traffic on a subinterface, specify the desired mpls-traffic-class policy using the qos interfaces interface output rewrite-rules command.

The following example applies a rewrite-rule policy to outbound traffic on a subinterface.

--{ candidate shared default }--[  ]--
# info qos interfaces interface ethernet-1/1
    qos {
        interfaces {
            interface ethernet-1/1 {
                interface-ref {
                    interface ethernet-1/1
                    subinterface 1
                output {
                    rewrite-rules {
                        mpls-traffic-class-policy mpls-rewrite-2
                    }
                }
            }
        }
    }