JUNOS class of service (CoS) provides you a pre-defined template to divide traffic into classes and offers various levels of pre-defined throughput and packet loss if congestion occurs. This allows packet loss to happen according to pre-configured rules that are configured by the user.
user@switch#
load merge /etc/config/ezqos-voip.conf
user@switch# set apply-groups ezqos-voip
edit class-of-service interfaces] user@switch# set ge-0/0/0 unit 0 classifiers dscp ezqos-dscp-classifier
[edit class-of-service interfaces] user@switch# set ge-0/0/1 scheduler-map ezqos-voip-sched-maps