Quality of Service Commands on the Cisco IOS XR Software
class map, up to eight values of the subsequent match statements are added to the first match vlan command,
exceeding which, the statement is rejected.
The match vlan inner command is supported on:
• Ingress and egress
• Layer 2 main interfaces and subinterfaces
• Layer 3 main interfaces
The match vlan inner command is not supported on Layer 3 subinterfaces or on bundles.
Task ID
Task ID
qos
Examples
The following example shows how to configure the service policy called policy1 and attach service policy
policy1 to an interface. In this example, class map vlan1 evaluates all packets entering Gigabit Ethernet
interface 0/1/0/0 for VLAN IDs of 1234, 1698, and all the VLAN IDs in the range 3000 to 4000. If the incoming
packet has been marked with any of these VLAN IDs, the packet is queued to the class queue with the
bandwidth setting of 300 kbps.
RP/0/RP0/CPU0:router(config)# class-map vlan1
RP/0/RP0/CPU0:router(config-cmap)# match vlan 1234 1698 3000-4000
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class vlan1
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# interface gigabitethernet 0/1/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
In this example, all traffic with an outer VLAN ID of 1 enters the Q-in-Any attachment circuit (AC), but the
inner VLAN ID can be any value. However, only the traffic with an inner VLAN ID of 1, 2, or 3 matches
class iv.
RP/0/RP0/CPU0:router(config)# policy-map p1
RP/0/RP0/CPU0:router(config-pmap)# class iv
RP/0/RP0/CPU0:router(config-pmap-c)# shape average percent 30
RP/0/RP0/CPU0:router(config-pmap-c)# set qos-group 1
RP/0/RP0/CPU0:router(config-pmap-c)# class class-default
RP/0/RP0/CPU0:router(config-pmap-c)# end-policy-map
RP/0/RP0/CPU0:router(config)#
RP/0/RP0/CPU0:router(config)# class-map match-any iv
RP/0/RP0/CPU0:router(config-cmap)# match vlan inner 1 2 3
RP/0/RP0/CPU0:router(config-cmap)# end-class-map
RP/0/RP0/CPU0:router(config)# interface gigabitethernet 0/6/5/0.2 l2transport
RP/0/RP0/CPU0:router(config-subif)# dot1q vlan 1 any
RP/0/RP0/CPU0:router(config-subif)# service-policy input p1
OL-23235-03
Cisco IOS XR Modular Quality of Service Command Reference for the Cisco CRS Router, Release 4.0
Operations
read, write
match vlan
61