I'm starting with CoS on a MX104 and reading the CoS Guide.
1 - When I use the firewall filter to classifiy the input of an interface, is the CoS for the whole session or just the packet?
2 - The classification has to be in the interface where the packets are dropped when the limit of that interface is reached?
ISP ---(10G)--- MX104 ---(20G)--- distribution-network
1. COS will be applied to all the packets which are matching to the firewall.
2nd point is not clear to me, can you please elaborate more.
1- The CoS is packet based- yes packet by packet that match the FF. Only the SRX supports session based packet processing.
2 - Yes the classification is on the ingress interface. You seem to be implying a policer which is a special FF that you can also use to set forwarding class for rate limited packets and disard those that fall outside of limits. But you do not have to drop the packets, you can send to another forwarding class like best effort.
You must also note that Juniper is not like other vendors that will also mark the packet header with a simple classification. You must also configure rewrite rules for the egress interface that will match what your classifier says.