Supported Platforms
Related Documentation
- M, MX, PTX, T Series
- Roadmap for Configuring CoS with IPv6 DiffServ
- System Requirements for CoS with DiffServ for IPv6
- Example: CoS with IPv6 DiffServ Configuration
- Additional Information
- Class of Service Using IPv6 DiffServ Feature Guide for Routing Devices
Overview of Class of Service Using IPv6 DiffServ
Class of service (CoS) is the assignment of traffic flows to different service levels. Service providers can use router-based CoS features to define service levels that provide different delay, jitter (delay variation), and packet loss characteristics to particular applications served by specific traffic flows.
Usually, IP routers forward packets independently and without any control on throughput or delay. This is known as best-effort service. This service is as good as the network equipment and links, and the result is satisfactory for many traditional IP applications emphasizing data delivery, such as e-mail or Web browsing. However, newer IP applications such as real-time video and audio (or voice) require lower delay, jitter, and loss parameters than simple best-effort networks can provide. CoS is intended for networks supporting these types of time-sensitive video and audio applications.
A router cannot compromise best-effort forwarding performance in order to deliver CoS features, because this merely trades one problem for another. When CoS features are enabled, they must allow routers to better process critical packets as well as best-effort traffic flows, even during times of congestion. Network throughput is determined by a combination of available bandwidth and delay. CoS guarantees a minimum bandwidth dedicated to a service class.
The main impact of CoS on network delay is in queueing delays, when packets are normally queued for output in the order of arrival, regardless of service class. Queuing delays increase with network congestion and often result in lost packets when queue buffers overflow. The other two elements of overall network delay, serial transmission delays determined by link speeds and propagation delays determined by media type, are not affected by CoS settings.
Any CoS implementation must work consistently end to end through the network. A standards-based, vendor-neutral CoS implementation satisfies this requirement best. Juniper Networks CoS features interoperate with other vendors’ CoS implementations because they are based on IETF Differentiated Services (DiffServ) standards.
DiffServ specifications establish a six-bit field in the IPv4 and IPv6 packet header to indicate the service class that should be applied to the packet. The bit values in the DiffServ field form DiffServ code points (DSCPs) that can be set by the application or a router on the edge of a DiffServ-enabled network.
Although CoS methods such as DiffServ specify the position and length of the DSCP in the packet header, the implementation of the router mechanisms to deliver DiffServ internally is vendor-specific. CoS functions in Junos OS are configured through a series of mechanisms that you can configure individually or in combination to define particular service offerings.
Figure 1 shows the components of the Junos CoS features, illustrating the sequence in which they interact.
Figure 1: Packet Flow Through CoS-Configurable Components

You can configure one or more of the following Junos CoS mechanisms:
- Classifiers—Allow you to associate incoming packets
with a forwarding class and packet loss priority (PLP). Two general
types of classifiers are supported:
- Behavior aggregate (BA) or code point traffic classifiers allow you to set the forwarding class and PLP based on DSCP.
- Multifield (MF) traffic classifiers allow you to set the forwarding class and PLP based on firewall filter rules. This is usually done at the edge of the network for packets that do not have valid DSCPs in the packet headers.
- Forwarding classes—Allow you to set the scheduling and marking of packets as they transit the router. Known as ordered aggregates in the DiffServ architecture, the forwarding class plus the loss priority determine the router’s per-hop behavior (PHB in DiffServ) for CoS.
- Loss priorities—Allow you to set the priority of dropping a packet before it is sent. Loss priority affects the scheduling of a packet without affecting the packet’s relative ordering.
- Forwarding policy options—Allow you to associate forwarding classes with next hops. Forwarding policy options also allow you to create classification overrides, which assign forwarding classes to sets of prefixes.
- Transmission scheduling and rate control—Provide
you with a variety of tools to manage traffic flows:
- Schedulers—Allow you to define the priority, bandwidth, delay buffer size, rate control status, and RED drop profiles to be applied to a particular forwarding class for packet transmission.
- Fabric schedulers—For M120, M320, and T Series routers only, fabric schedulers allow you to identify a packet as high or low priority based on its forwarding class, and to associate schedulers with the fabric priorities.
- Policers for traffic classes—Allow you to limit traffic of a certain class to a specified bandwidth and burst size. Packets exceeding the policer limits can be discarded, or can be assigned to a different forwarding class or to a different loss priority, or to both. You define policers with filters that can be associated with input or output interfaces.
- Rewrite markers—Allow you to redefine the DSCP value of outgoing packets. Rewriting or marking outbound packets is useful when the router is at the border of a network and must alter the code points to meet the policies of the targeted peer.
Typically, rewrites of the DSCPs on outgoing packets are done once, when packets enter the DiffServ portion of the network, either because the packets do not arrive from the customer with the proper DSCP bit set or because the service provider wishes to verify that the customer has set the DSCP properly. CoS schemes that accept the DSCP and classify and schedule traffic solely on DSCP value perform behavior aggregate (BA) DiffServ functions and do not usually rewrite the DSCP. DSCP rewrites typically occur in multifield (MF) DiffServ scenarios.
Related Documentation
- M, MX, PTX, T Series
- Roadmap for Configuring CoS with IPv6 DiffServ
- System Requirements for CoS with DiffServ for IPv6
- Example: CoS with IPv6 DiffServ Configuration
- Additional Information
- Class of Service Using IPv6 DiffServ Feature Guide for Routing Devices
Published: 2013-07-19
Supported Platforms
Related Documentation
- M, MX, PTX, T Series
- Roadmap for Configuring CoS with IPv6 DiffServ
- System Requirements for CoS with DiffServ for IPv6
- Example: CoS with IPv6 DiffServ Configuration
- Additional Information
- Class of Service Using IPv6 DiffServ Feature Guide for Routing Devices