This entire chapter is predicated on one assumption: the DSCP values have been set correctly before the packets enter your router. If the DSCP values are uniformly applied across an entire network, it's pretty straightforward. You can trust that the configured forwarding classes match the type of traffic that is inbound, and all your CoS configuration just works.
The problem is that at the edge of your network, you're exceedingly unlikely to receive packets that consider your particular CoS implementation. As an example, do you typically ask your peering networks what DSCP values they use? Probably not. Similarly, they have no idea what you use. So any traffic that is passed over that boundary needs to be classified independent of the BA classifiers.
The big question is how to do it. The answer is multifield classifiers. MF classifiers work very similarly to BA classifiers in that they examine the packet's header and based on the contents therein, assign the packet to a forwarding class. The difference is that MF classifiers examine more than just the CoS bits in the header.
If you accept the premise that your neighboring networks don't know or don't care what CoS bits are set in packets that are sent to your network, you have to find a different way to match traffic. You can do so in two easy ways:
In many cases, the ...