Example 2: Traffic classification and bandwidth allocation in VXLAN topology using CoS value on access ports and DSCP value on network ports
This example describes how to configure QoS in a VXLAN topology using Class of Service (CoS) value on access ports and DSCP value on network ports.
In this example:
The interfaces between the leaf switches and the hosts are VLAN-tagged interfaces.
The interfaces between the leaf and the spine switches are L3 interfaces.
Traffic from the hosts comes with its respective CoS value. This configuration maps dot1p priority (CoS) value of 3 to queue 3. OS10 by default maps all other traffic to queue 0. At the ingress VTEP, the CoS value is matched and the packet with a CoS value of 3 is marked with a DSCP value of 24 and is assigned to queue 3. The packet from ingress VTEP reaches the spine switch with the modified DSCP value in both the inner and outer IP header.
On the spine nodes, the DSCP value is matched and the packet with a DSCP value of 24 is assigned to queue 3.
At the egress VTEP, the DSCP value is matched and the packet with a DSCP value of 24 is marked with a CoS value of 3 and assigned to queue 3.
The packet reaches the destination with a CoS value of 3.
Queue 3 is assigned 65% bandwidth on all nodes. Traffic with a CoS value of 3 or a DSCP value of 24 is given 65% bandwidth. If there is congestion at the egress port, this traffic (queue 3) gets more bandwidth and avoids traffic loss. All other traffic gets the remaining bandwidth per the default settings.
Bandwidth allocation is done globally in
system-qos mode.
Classification and marking are done at the interface level with different settings for access and network ports.
NOTE: On ingress VTEP, the match criteria used in the class map could be based on access-list, VLAN, CoS, or DSCP. On the destination VTEP, the lookup is done based on the inner header fields of the IP header.
NOTE: For Underlay, Overlay VXLAN configuration, see the VXLAN chapter.
L1 Switch
Configure class map and policy map for access port. Traffic with a CoS value of 3 is matched, assigned to qos-group 3, and marked with a DSCP value of 24.
OS10(config)# class-map type qos CM_QOS_MATCH_CS3
OS10(config-cmap-qos)# match cos 3
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_ACCESS_PORT
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_CS3
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# set dscp 24
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure class map and policy map for the network port. Traffic with a DSCP value of 24 is matched, assigned to qos-group 3, and marked with a CoS value of 3.
OS10(config)# class-map type qos CM_QOS_MATCH_DSCP24
OS10(config-cmap-qos)# match ip dscp 24
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_NETWORK_PORT
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# set cos 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure queuing at egress with a bandwidth allocation of 65% for queue 3.
OS10(config)# class-map type queuing CM_QUEUING_Q3
OS10(config-cmap-queuing)# match queue 3
OS10(config-cmap-queuing)# exit
OS10(config)# policy-map type queuing PM_QUEUING
OS10(config-pmap-queuing)# !
OS10(config-pmap-queuing)# class CM_QUEUING_Q3
OS10(config-pmap-c-que)# bandwidth percent 65
OS10(config-pmap-c-que)# exit
OS10(config-pmap-queuing)# exit
Configure policy map for the VLTi port.
OS10(config)# policy-map type qos PM_QOS_VLTI
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# !
OS10(config-pmap-c-qos)# class CM_QOS_MATCH_CS3
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Apply the QoS configuration on the access, network, and VLTi ports.
Apply the queuing policy map globally in the
system-qos mode.
OS10(config)# system qos
OS10(config-sys-qos)# service-policy output type queuing PM_QUEUING
OS10(config-sys-qos)# end
L2 Switch
Configure class map and policy map for access port. Traffic with a CoS value of 3 is matched, assigned to qos-group 3, and marked with a DSCP value of 24.
OS10(config)# class-map type qos CM_QOS_MATCH_CS3
OS10(config-cmap-qos)# match cos 3
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_ACCESS_PORT
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_CS3
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# set dscp 24
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure class map and policy map for the network port. Traffic with a DSCP value of 24 is matched, assigned to qos-group 3, and marked with a CoS value of 3.
OS10(config)# class-map type qos CM_QOS_MATCH_DSCP24
OS10(config-cmap-qos)# match ip dscp 24
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_NETWORK_PORT
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# set cos 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure queuing at egress with a bandwidth allocation of 65% for queue 3.
OS10(config)# class-map type queuing CM_QUEUING_Q3
OS10(config-cmap-queuing)# match queue 3
OS10(config-cmap-queuing)# exit
OS10(config)# policy-map type queuing PM_QUEUING
OS10(config-pmap-queuing)# !
OS10(config-pmap-queuing)# class CM_QUEUING_Q3
OS10(config-pmap-c-que)# bandwidth percent 65
OS10(config-pmap-c-que)# exit
OS10(config-pmap-queuing)# exit
Configure policy map for the VLTi port.
OS10(config)# policy-map type qos PM_QOS_VLTI
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# !
OS10(config-pmap-c-qos)# class CM_QOS_MATCH_CS3
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Apply the QoS configuration on the access, network, and VLTi ports.
Apply the queuing policy map globally in the
system-qos mode.
OS10(config)# system qos
OS10(config-sys-qos)# service-policy output type queuing PM_QUEUING
OS10(config-sys-qos)# end
L3 Switch
Configure class map and policy map for access port. Traffic with a CoS value of 3 is matched, assigned to qos-group 3, and marked with a DSCP value of 24.
OS10(config)# class-map type qos CM_QOS_MATCH_CS3
OS10(config-cmap-qos)# match cos 3
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_ACCESS_PORT
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_CS3
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# set dscp 24
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure class map and policy map for the network port. Traffic with a DSCP value of 24 is matched, assigned to qos-group 3, and marked with a CoS value of 3.
OS10(config)# class-map type qos CM_QOS_MATCH_DSCP24
OS10(config-cmap-qos)# match ip dscp 24
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_NETWORK_PORT
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# set cos 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure queuing at egress with a bandwidth allocation of 65% for queue 3.
OS10(config)# class-map type queuing CM_QUEUING_Q3
OS10(config-cmap-queuing)# match queue 3
OS10(config-cmap-queuing)# exit
OS10(config)# policy-map type queuing PM_QUEUING
OS10(config-pmap-queuing)# !
OS10(config-pmap-queuing)# class CM_QUEUING_Q3
OS10(config-pmap-c-que)# bandwidth percent 65
OS10(config-pmap-c-que)# exit
OS10(config-pmap-queuing)# exit
Configure policy map for the VLTi port.
OS10(config)# policy-map type qos PM_QOS_VLTI
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# !
OS10(config-pmap-c-qos)# class CM_QOS_MATCH_CS3
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Apply the QoS configuration on the access, network, and VLTi ports.
Apply the queuing policy map globally in the
system-qos mode.
OS10(config)# system qos
OS10(config-sys-qos)# service-policy output type queuing PM_QUEUING
OS10(config-sys-qos)# end
L4 Switch
Configure class map and policy map for access port. Traffic with a CoS value of 3 is matched, assigned to qos-group 3, and marked with a DSCP value of 24.
OS10(config)# class-map type qos CM_QOS_MATCH_CS3
OS10(config-cmap-qos)# match cos 3
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_ACCESS_PORT
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_CS3
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# set dscp 24
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure class map and policy map for the network port. Traffic with a DSCP value of 24 is matched, assigned to qos-group 3, and marked with a CoS value of 3.
OS10(config)# class-map type qos CM_QOS_MATCH_DSCP24
OS10(config-cmap-qos)# match ip dscp 24
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_NETWORK_PORT
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# set cos 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure queuing at egress with a bandwidth allocation of 65% for queue 3.
OS10(config)# class-map type queuing CM_QUEUING_Q3
OS10(config-cmap-queuing)# match queue 3
OS10(config-cmap-queuing)# exit
OS10(config)# policy-map type queuing PM_QUEUING
OS10(config-pmap-queuing)# !
OS10(config-pmap-queuing)# class CM_QUEUING_Q3
OS10(config-pmap-c-que)# bandwidth percent 65
OS10(config-pmap-c-que)# exit
OS10(config-pmap-queuing)# exit
Configure policy map for the VLTi port.
OS10(config)# policy-map type qos PM_QOS_VLTI
OS10(config-pmap-qos)# !
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# !
OS10(config-pmap-c-qos)# class CM_QOS_MATCH_CS3
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Apply the QoS configuration on the access, network, and VLTi ports.
Apply the queuing policy globally in the
system-qos mode.
OS10(config)# system qos
OS10(config-sys-qos)# service-policy output type queuing PM_QUEUING
OS10(config-sys-qos)# end
S1 Switch
Configure class map and policy map for the access port. Traffic with a DSCP value of 24 is matched and assigned to qos-group 3.
OS10(config)# class-map type qos CM_QOS_MATCH_DSCP24
OS10(config-cmap-qos)# match ip dscp 24
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_LEAF_PORT
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure queuing at egress with a bandwidth allocation of 65% for queue 3.
OS10(config)# class-map type queuing CM_QUEUING_Q3
OS10(config-cmap-queuing)# match queue 3
OS10(config-cmap-queuing)# exit
OS10(config)# policy-map type queuing PM_QUEUING
OS10(config-pmap-queuing)# class CM_QUEUING_Q3
OS10(config-pmap-c-que)# bandwidth percent 65
OS10(config-pmap-c-que)# exit
OS10(config-pmap-queuing)# exit
Apply the queuing policy globally in the
system-qos mode.
OS10(config)# system qos
OS10(config-sys-qos)# show configuration
OS10(config-sys-qos)# service-policy output type queuing PM_QUEUING
OS10(config-sys-qos)# exit
Apply QoS configuration on the leaf node-facing ports.
OS10(config)# interface ethernet 1/1/21
OS10(conf-if-eth1/1/21)# service-policy input type qos PM_QOS_LEAF_PORT
OS10(config)# interface ethernet 1/1/22
OS10(conf-if-eth1/1/22)# service-policy input type qos PM_QOS_LEAF_PORT
OS10(config)# interface ethernet 1/1/23
OS10(conf-if-eth1/1/23)# service-policy input type qos PM_QOS_LEAF_PORT
OS10(config)# interface ethernet 1/1/24
OS10(conf-if-eth1/1/24)# service-policy input type qos PM_QOS_LEAF_PORT
S2 Switch
Configure class map and policy map for the access port. Traffic with a DSCP value of 24 is matched and assigned to qos-group 3.
OS10(config)# class-map type qos CM_QOS_MATCH_DSCP24
OS10(config-cmap-qos)# match ip dscp 24
OS10(config-cmap-qos)# exit
OS10(config)# policy-map type qos PM_QOS_LEAF_PORT
OS10(config-pmap-qos)# class CM_QOS_MATCH_DSCP24
OS10(config-pmap-c-qos)# set qos-group 3
OS10(config-pmap-c-qos)# exit
OS10(config-pmap-qos)# exit
Configure queuing at egress with a bandwidth allocation of 65% for queue 3.
OS10(config)# class-map type queuing CM_QUEUING_Q3
OS10(config-cmap-queuing)# match queue 3
OS10(config-cmap-queuing)# exit
OS10(config)# policy-map type queuing PM_QUEUING
OS10(config-pmap-queuing)# class CM_QUEUING_Q3
OS10(config-pmap-c-que)# bandwidth percent 65
OS10(config-pmap-c-que)# exit
OS10(config-pmap-queuing)# exit
Apply the queuing policy globally in the
system-qos mode.
OS10(config)# system qos
OS10(config-sys-qos)# show configuration
OS10(config-sys-qos)# service-policy output type queuing PM_QUEUING
OS10(config-sys-qos)# exit
Apply QoS configuration on the leaf node-facing ports.
OS10(config)# interface ethernet 1/1/21
OS10(conf-if-eth1/1/21)# service-policy input type qos PM_QOS_LEAF_PORT
OS10(config)# interface ethernet 1/1/22
OS10(conf-if-eth1/1/22)# service-policy input type qos PM_QOS_LEAF_PORT
OS10(config)# interface ethernet 1/1/23
OS10(conf-if-eth1/1/23)# service-policy input type qos PM_QOS_LEAF_PORT
OS10(config)# interface ethernet 1/1/24
OS10(conf-if-eth1/1/24)# service-policy input type qos PM_QOS_LEAF_PORT
Verify if the packets are assigned to the respective queues. Packets with a dot1p priority of 3 or DSCP value of 24 is assigned queue 3 and packets with other dot1p priority or DSCP value is assigned to queue 0. Given that we have allocated a bandwidth of 65% to queue 3, queue 3 traffic gets more bandwidth and other traffic gets less bandwidth. During congestion, the drop counter indicates packet drops for queue 0 and no drops for queue 3. Notice that in the following
show outputs, traffic from queue 0 is dropped when there is congestion; however, queue 3 still gets a guaranteed bandwidth of 65%.