What Junos CoS components are used to classify a packet and what order do they operate?
First up a behavior aggregate (BA) is a method of classification that operates on a packet as it enters the routing device. A CoS field in the packet header is examined, and this single field determines the CoS settings applied to the packet. BA classifiers allow you to set the forwarding class and packet loss priority (PLP) based on the Differentiated Services code point (DSCP) value, DSCP IPv6 value, IP precedence value, MPLS EXP bits (that is, MPLS traffic class), or IEEE802.1p value. The default classifier is based on the IP precedence value. Please see the following: https://www.juniper.net/techpubs/en_US/junos15.1/topics/concept/classifier-ba-overview-cos-config-guide.html
Next in line a multifield classifier is a second method for classifying traffic flows. Unlike a BA classifier, a multifield classifier can examine multiple fields in the packet, such as the source and destination address and source and destination port numbers of the packet. With multifield classifiers, you set the forwarding class and PLP based on firewall filter rules. Multifield classification is usually done at the edge of the network for packets that do not have valid or trusted behavior aggregate code points. Please see the following: https://www.juniper.net/techpubs/en_US/junos15.1/topics/concept/mf-classifiers-overview-cos-config-guide.html
For a specific interface you can configure both a multifield classifier and a BA classifier without conflicts. Because the classifiers are always applied in sequential order - the BA classifier followed by the multifield classifier - any BA classification result is overridden by a multifield classifier if they conflict.
Finally a policer can define a set of traffic rate limits and sets consequences for traffic that does not conform to the configured limits. Packets in a traffic flow that do not conform to traffic limits are either discarded (standard, hard rate limiting) or marked with a different forwarding class or PLP level (soft rate limiting). Please see the following: https://www.juniper.net/techpubs/en_US/junos15.1/topics/concept/policer-overview.html