Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Configuring CoS for MPLS Traffic

To configure class of service (CoS) for Multiprotocol Label Switching (MPLS) packets in a label-switched path (LSP), include the class-of-service statement with the appropriate CoS value:

class-of-service cos-value;

If you do not specify a CoS value, the IP precedence bits from the packet’s IP header are used as the packet’s CoS value.

You can include this statement at the following hierarchy levels:

  • [edit protocols mpls]
  • [edit protocols mpls label-switched-path path-name]
  • [edit protocols mpls label-switched-path path-name primary path-name]
  • [edit protocols mpls label-switched-path path-name secondary path-name]
  • [edit protocols rsvp interface interface-name link-protection]
  • [edit protocols rsvp interface interface-name link-protection bypass destination]
  • [edit logical-systems logical-system-name protocols mpls]
  • [edit logical-systems logical-system-name protocols mpls label-switched-path path-name]
  • [edit logical-systems logical-system-name protocols mpls label-switched-path path-name primary path-name]
  • [edit logical-systems logical-system-name protocols mpls label-switched-path path-name secondary path-name]
  • [edit logical-systems logical-system-name protocols rsvp interface interface-name link-protection ]
  • [edit logical-systems logical-system-name protocols rsvp interface interface-name link-protection bypass destination]

The class-of-service statement at the [edit protocols mpls label-switched-path] hierarchy level assigns an initial EXP value for the MPLS shim header of packets in the LSP. This value is initialized at the ingress routing device only and overrides the rewrite configuration established for that forwarding class. However, the CoS processing (weighted round robin [WRR] and RED) of packets entering the ingress routing device is not changed by the class-of-service statement on an MPLS LSP. Classification is still based on the behavior aggregate (BA) classifier at the [edit class-of-service] hierarchy level or the multifield classifier at the [edit firewall] hierarchy level.

Best Practice: We recommend configuring all routing devices along the LSP to have the same input classifier for EXP, and, if a rewrite rule is configured, all routing devices should have the same rewrite configuration. Otherwise, traffic at the next LSR might be classified into a different forwarding class, resulting in a different EXP value being written to the EXP header.

Published: 2013-08-28