Figure 64 shows an example topology where a service provider offers the following differentiated services to its customers over its MPLS network:
For PE-to-CE traffic, IP policy on the PE router resets the traffic-class/color combination according to the received, well-defined IP precedence value, so that egress queuing is based on the IP precedence value. This action takes place on the egress line module.
For PE-to-CE traffic, IP policy on the PE router resets the traffic-class/color combination to the default value, best-effort/green, so that packets are queued as best-effort. The IP precedence value is left unchanged.
In this example, the provider also offers an inter-AS VPN service. The provider's own protocol traffic, for example, BGP signaling traffic such as update messages, is also labeled, with the EXP bits set to the same value as the IP precedence.
The egress queuing of traffic as it leaves the provider is always based on either the VPN EXP bits as received on the core side in inter-AS case, or the IP precedence value in all other cases. It is acceptable that fabric queuing is based on the incoming base label's EXP.
Figure 64: Differentiated Services over an MPLS Network

To configure the differentiated services described in this example:
- host1(config)#ip classifier-list prec0 ip
any any precedence 0
- host1(config)#ip classifier-list prec1 ip
any any precedence 1
- host1(config)#ip policy-list qos-service
- host1(config-policy-list)#classifier-group
prec0
- host1(config-policy-list-classifier-group)#user-packet-class 0
- host1(config-policy-list-classifier-group)#traffic-class class0
- host1(config-policy-list-classifier-group)#color green
- host1(config-policy-list)#classifier-group
prec1
- host1(config-policy-list-classifier-group)#user-packet-class 1
- host1(config-policy-list-classifier-group)#traffic-class class1
- host1(config-policy-list-classifier-group)#color green
- host1(config)#interface atm 3/0.1
- host1(config-subif)#ip policy input qos-service
- host1(config)#ip policy-list plain-service
- host1(config-policy-list-classifier-group)#user-packet-class 0
- host1(config-policy-list-classifier-group)#traffic-class best-effort
- host1(config-policy-list-classifier-group)#color green
- host1(config)#interface atm 5/0.1
- host1(config-subif)#ip policy input plain-service
- host1(config)#Interface atm 3/0.1
- host1(config-subif)#Ip policy output qos-service
Attach an IP output policy for the plain VPN service to CE interfaces on the PE router for outgoing traffic. The same plain-service policy that is attached to the input in Step 2 can be used on output, although the UPC setting is not needed.
- host1(config)#Interface atm 5/0.1
- host1(config-subif)#Ip policy output plain-service
- host1(config)#mpls match traffic-class …
color … set exp-bits …
- host1(config)#mpls copy-upc-to-exp
- host1(config)#mpls preserve-vpn-exp
You must attach a policy to the core-side IP interface to set the UPC value of the control traffic appropriately so that the EXP bits value is copied from the UPC when this traffic goes out as MPLS packets.
- host1(config)#ip classier-list control-traffic-prec0
…
- host1(config)#ip classier-list control-traffic-prec1
…
- host1(config)#ip policy-list core-ip-policy
- host1(config-policy-list)#classifier-group
control-traffic-prec0
- host1(config-policy-list-classifier-group)#user-packet-class prec0
- host1(config-policy-list-classifier-group)#traffic-class class0
- host1(config-policy-list-classifier-group)#color green
- host1(config-policy-list)#classifier-group
control-traffic-prec1
- host1(config-policy-list-classifier-group)#-packet-class prec1
- host1(config-policy-list-classifier-group)#traffic-class class1
- host1(config-policy-list-classifier-group)#color green
- host1(config)#interface pos 0/0
- host1(config-subif)ip policy output core-ip-policy
- host1(config)#mpls match exp-bits <value> set traffic-class <className> color