MPLS QoS configuration

Configuring MPLS traffic-class policy

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 input classifiers command.

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

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

Configuring MPLS rewrite rules

To configure an MPLS rewrite-rule policy, map one or more forwarding classses 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 output rewrite-rules command.

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

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