MPLS QoS configuration

Configuring MPLS traffic-class policy

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

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 mpls-policy-1
                    }
                }
            }
        }
    }

Configuring MPLS rewrite rules

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

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 mpls-rewrite-2
                    }
                }
            }
        }
    }