Marking Overview
Marking is a process, which helps to modify the quality of service for incoming and outgoing packets. You can use marking commands in traffic classes, which are referenced in the policy map.
Ingress marking techniques:
-
set cos
-
set dei
-
set precedence
-
set dscp
-
set exponential
-
set traffic-class
-
set qos-group
-
set discard-class
-
unconditional marking
Egress marking techniques:
-
set cos
-
set dei
-
conditional marking
Default Marking Behavior
When an ingress or egress interface adds VLAN tags or MPLS labels, it requires a default value for the CoS and EXP values that go into those tags and labels. The default value can be then overridden based on the policy map. The default value for CoS and EXP is based on a trusted field in the packet upon ingress to the system. The router implements an implicit trust of certain fields based on the packet type and ingress interface forwarding type (Layer 2 or Layer 3).
By default, the router does not modify the IP precedence or DSCP without a policy-map being configured. The default behavior is described below.
On an ingress or egress Layer 2 interface, such as xconnect, the outermost CoS value is used for any field that gets added in the ingress interface. If there is a VLAN tag that gets added due to a Layer 2 rewrite, the incoming outermost CoS value is used for the new VLAN tag. If an MPLS label is added, the CoS value would be used for the EXP bits in the MPLS tag.
On an ingress or egress Layer 3 interface (routed or label weighted for IPv4 packets), the three DSCP and precedence bits are identified in the incoming packet. For MPLS packets, the outermost label’s EXP bit is identified, and this value is used for any new field that gets added at the ingress interface. If an MPLS label is added, then the identified precedence, DSCP, or MPLS EXP value is used for the EXP bits in the newly added MPLS tag.