Understanding Class of Service
When a network experiences congestion and delay, some packets must be dropped. Junos OS class of service (CoS) allows you to divide traffic into classes and offer various levels of throughput and packet loss when congestion occurs. This allows packet loss to happen according to the rules you configure.
For interfaces that carry IPv4, IPv6, or MPLS traffic, you can configure the Junos OS CoS features to provide multiple classes of service for different applications. On the device, you can configure multiple forwarding classes for transmitting packets, define which packets are placed into each output queue, schedule the transmission service level for each queue, and manage congestion using a random early detection (RED) algorithm.
Traffic shaping is the allocation of the appropriate amount of network bandwidth to every user and application on an interface. The appropriate amount of bandwidth is defined as cost-effective carrying capacity at a guaranteed CoS. You can use a Juniper Networks device to control traffic rate by applying classifiers and shapers.
The CoS features provide a set of mechanisms that you can use to provide differentiated services when best-effort delivery is insufficient.
Using Junos OS CoS features, you can assign service levels with different delay, jitter (delay variation), and packet loss characteristics to particular applications served by specific traffic flows. CoS is especially useful for networks supporting time-sensitive video and audio applications.
CoS features include traffic classifying, policing, queuing, scheduling, shaping and marker rewriting. You can configure all these features on the physical interfaces. So, the speeds of physical interfaces are of very much importance for CoS. Previously, vSRX Virtual Firewall instances supported only 1-Gbps interface speed even if the physical interface speed was more. As a result, CoS could be enabled only at 1G bandwidth even when the interfaces can actually support 1-Gbps, 10-Gbps, 40-Gbps, and 100-Gbps rates.
Currently on vSRX Virtual Firewall and vSRX Virtual Firewall 3.0 instances, different physical interface speed rates of 1-Gbps, 10-Gbps, 40-Gbps, and 100-Gbps are supported to configure CoS features. VMXNET3 or VIRTIO interface speed is 10Gbps, SR-IOV interface speed depends on the ethernet card.
If an interface speed configured is none of these speeds then the speed considered for CoS features is 1-Gbps.
Overall performance of network traffic is usually measured by aspects such as the bandwidth, delay, and error rate. If there is congestion in the network then packets are dropped. CoS helps divide the traffic during the time of congestion. So, with the different physical interface speed rates supported to configure CoS the CoS performance is improved.
Policing, scheduling, and shaping CoS services are not supported for pre-encryption and post-encryption packets going into and coming out of an IPsec VPN tunnel.
Junos OS supports the following RFCs for traffic classification and policing:
RFC 2474, Definition of the Differentiated Services Field in the IPv4 and IPv6
RFC 2475, An Architecture for Differentiated Services
RFC 2597, Assured Forwarding PHB Group
RFC 2598, An Expedited Forwarding PHB
RFC 2697, A Single Rate Three Color Marker
RFC 2698, A Two Rate Three Color Marker