The 3-bit 'EXP' field in the MPLS header can be used to define a Class of Service (CoS) value for packets traveling through the LSP. The user can manually set a CoS value for the LSP. The CoS value that the user sets is applied to the CoS (EXP) field in the MPLS header of all packets entering this LSP. This lets all packets traveling through an LSP to be treated with the same priority as they travel the MPLS domain. The user can assign the LSP a CoS in the range 0-7.
To assign a CoS value of 7 (highest priority) to all packets traveling through LSP tunnel 1, complete the following steps.device# configure
device(config)# router mpls
device(config-router-mpls)# lsp tunnel1
device(config-router-mpls-lsp-tunnel1)# cos 7
The MPLS CoS value is used for determining priority within an MPLS domain only, so when the label is popped, the CoS value in the MPLS header is discarded; it is not copied back to the IP ToS field.
The following example shows how to configure the cos command with a value of 7.
device# configure device(config)# router mpls device(config-router-mpls)# lsp tunnel1 device(config-router-mpls-lsp-tunnel1)# cos 7