2. Supported QoS Policies
• QoS: This defines the Modular QoS command line interface, MQC objects used for marking and policing.
• Network-QoS: This is required on F-Series modules only.
• Queuing: This defines MQC objects used for queuing and scheduling of the marking objects.
• Control Plane: Defines MQC objects used for Control plane policing (CoPP)
Enterprise Engineering Solutions 2
3. Nexus 7000 M1/M2 fabric CoS Mappings
Fabric queue factor CoS values
PQ1 (priority queuing 1) 5-7
Q2 (Queuing 2) 3-4
Q3 2
Q4 0-1
- PQ1 is scheduled on a strict-priority basis.
- Q2-Q4 are scheduled with round-robin fashion and are assigned equal weights.
Enterprise Engineering Solutions 3
4. M2 QoS Design Steps
The three primary QoS requirements of a data center core switch are to:
• Trust CoS and DSCP on ingress
• Queue on ingress.
• Queue on egress.
Because the default behavior of the Nexus7K is tor trust CoS and DSCP on ingress, there are effectively only
two steps to configure QoS on a Nexus 7000 with M2-Series module in a data center switch:
1. Configure ingress queuing.
2. Configure egress queuing.
Each Nexus 7K M2-series module supports an 8Q2T ingress queuing structure and a 1P7Q4T egress queuing
structure. The pre-configured Queuing class map names for ingress and egress model are shared on the next
slide.
Enterprise Engineering Solutions 4
6. M2 four-class Queuing Model
• In the four-class model, the application class to queue mappings are as follows:
1. Real-time traffic: Mapped to CoS value 5. This is allocated 25% of the bandwidth in the ingress 4Q2T
model.
2. Signaling traffic: Mapped with default CoS of 3. This is assigned to a dedicated non-priority queue with a
25% bandwidth allocation in the ingress 4Q2T model and a 35% bandwidth in egress 1P3Q4T model.
3. Transactional data traffic: Mapped with CoS 2 with same ingress and egress bandwidth model as above.
4. Best effort traffic: This is mapped with a default CoS value of 0. This is assigned to the default queue with
a 25% bandwidth allocation in ingress 4Q2T model and a 30% bandwidth-remaining allocation in the
egress 1P3Q4T model.
Enterprise Engineering Solutions 6
7. Nexus 7k M2 Four-Class Queuing Example
N7K(config-cmap-que)#class-map type queuing match-any 8q2t-in-q1
N7K(config-cmap-que)#match cos 5-7
N7K(config-cmap-que)#class-map type queuing match-any 8q2t-in-q2
N7K(config-cmap-que)#match cos 3
N7K(config-cmap-que)#class-map type queuing match-any 8q2t-in-q3
N7K(config-cmap-que)#match cos 2
N7K(config-cmap-que)#class-map type queuing match-any 1p7q4t-out-pq1
N7K(config-cmap-que)#match cos 5-7
N7K(config-cmap-que)#class-map type queuing match-any 1p7q4t-out-q2
N7K(config-cmap-que)#match cos 3
N7K(config-cmap-que)#class-map type queuing match-any 1p7q4t-out-q3
N7K(config-cmap-que)#match cos 2
Real-time traffic is mapped to ingress Q1.
Signaling is mapped to ingress Q2.
Transactional data is mapped to ingress Q3
Real-time traffic is mapped to egress Q1.
Signaling is mapped to egress Q2.
Transactional data is mapped to egress Q3
So this configures our ingress and egress queuing class maps.
Enterprise Engineering Solutions 7
8. N7K(config-cmap-que)#policy-map type queuing 4Q2T-Ingress
N7K(config-cmap-que)#class type queuing 8q2t-in-q1
N7K(config-cmap-que)#bandwidth percent 25
N7K(config-cmap-que)#class type queuing 8q2t-in-q2
N7K(config-cmap-que)#bandwidth percent 25
N7K(config-cmap-que)#class type queuing 8q2t-in-q3
N7K(config-cmap-que)#bandwidth 25
N7K(config-cmap-que)#policy-map type queuing 1P3Q4T-EGRESS
N7K(config-cmap-que)#class type queuing 1p7q4t-out-pq1
N7K(config-cmap-que)#priority
N7K(config-cmap-que)#class type queuing 1p7q4t-out-q2
N7K(config-cmap-que)#bandwidth remaining percent 35
N7K(config-cmap-que)#class type queuing 1p7q4t-out-q3
N7K(config-cmap-que)#bandwidth remaining percent 30
Now after creating all the egress class-maps, we have
Brought all of them inside a policy-map type queuing with name
4Q2T-Ingress for egress traffic.
Under every class map we have allotted a particular bandwidth to
Utilized.
Now after creating all the ingress class-maps, we have
Brought all of them inside a policy-map type queuing with name
4Q2T-Ingress for ingress traffic.
Under every class map we have allotted a particular bandwidth to
Utilized.
So till now, our policy maps along with their respective class maps are ready to be used on the interfaces.
Enterprise Engineering Solutions 8
9. Applying queuing policies on the interfaces.
N7K(config)#interface Ethernet 1/1
N7K(config)#service-policy type queuing input 4Q2T-Ingress
N7K(config)#service-policy type queuing output 1P3Q4T-EGRESS
When we are applying the policy map on an interface, we use
the “service-policy” command with same name as for the policy-
maps to include their ingress/egress rules on the configured
interface.
Enterprise Engineering Solutions 9
10. Configuration verification:
Using the below commands, we can verify the QoS configuration on the desired interfaces:
1. Show class-map type queuing
2. Show policy-map type queuing
3. Show policy-map interface
Enterprise Engineering Solutions 10
11. Bandwidth allocation:
To allocate a minimum percentage of the interface’s bandwidth to a queue and configure the bandwidth on
both ingress and egress queues, we use the bandwidth command.
We can use the system-defined ingress or egress queue class for the type of module to which we want to apply
the policy map.
1Gig Module CoS class map names
Enterprise Engineering Solutions 11
13. Bandwidth configuration example:
Switch(config):policy-map type queuing my-policy
Switch(config-pmap-que)#class type queuing 1p7q4t-out-pq1
Switch(config-pmap-c-que)#bandwidth 1 gbps
Switch(config-pmap-c-que)#exit
Switch(config-pmap-que)#class type queuing 8q2t-in-q1
Switch(config-pmap-c-que)#bandwidth 1 gbps
Enterprise Engineering Solutions 13
14. Bandwidth remaining:
To configure the percentage of the bandwidth remaining on the interface after other allocations are configured
on both the ingress and egress queues, we use the bandwidth remaining command.
For this again, we can use the system-defined ingress or egress class map of the type of module being used to
apply the policy map to.
EXAMPLE:
(config)#policy-map type queuing my-policy1
(config-pmap-que)#class type queing 1p7q4t-out-pq1
(config-pmap-c-que)#bandwidth remaining percent 10
Enterprise Engineering Solutions 14
16. Continued…
While configuring CoS to Queue mapping, we have the following options
Among these, the M2 module 10G/40G/100G mappings are:
Ingress:
8q2t-in-q-default
8q2t-in-q1
8q2t-in-q2
8q2t-in-q3
8q2t-in-q4
8q2t-in-q5
8q2t-in-q6
8q2t-in-q7
Egress:
1p7q4t-out-pq1
1p7q4t-out-q-default
1p7q4t-out-q2
1p7q4t-out-q3
1p7q4t-out-q4
1p7q4t-out-q5
1p7q4t-out-q6
1p7q4t-out-q7
Enterprise Engineering Solutions 16
17. Use cases:
I want to limit the maximum bandwidth from any particular VLAN/SVI to say 1Gbps
when there is congestion
Let’s assume the below situation:
VLAN-20 -> CoS value of 5 to 7 -> Most important application VLAN -> Needs maximum bandwidth of 1 gbps
VLAN-10 -> CoS value of 0 -> Data backup application -> Needs to use the 10% of the remaining bandwidth of
the interface.
VLAN-5 -> CoS value of 0 -> Replication application -> Needs to use 10% of the remaining bandwidth of the
interface.
So not let’s see how configuration can be done to achieve this.
Enterprise Engineering Solutions 17
18. Ingress class-map:
#class-map type queuing match-any 8q2t-in-q1
#match cos 5-7
#class-map type queuing match-any 8q2t-in-q-default
#match cos 0-4
Egress class-map:
#class-map type queuing match-any 1p7q4y-out-pq1
#match cos 5-7
#class-map type queuing match-any 1p7q4t-out-q-default
#match cos 0-4
While configuring the ingress class maps, we have broadly classified the
traffic into two categories:
1- All traffic with CoS values between 5 -7
2- All other traffic with CoS values between 0-4
A similar classification of the egress traffic has been configured in
these four commands as above for ingress traffic.
Enterprise Engineering Solutions 18
19. Continued…
Ingress policy-map:
#policy-map type queuing my-ingress-policy
#class type queuing 8q2t-in-q1
#bandwidth 1 gbps
#class type queuing 8q2t-in-q-default
#bandwidth remaining percent 10
Egress policy-map:
#policy-map type queuing my-egress-policy
#class type queuing 1p7q4y-out-pq1
#bandwidth 1 gbps
#priority level1
#class type queuing 1p7q4t-out-q-default
#bandwidth remaining percent 10
Now we have defined the previously configured ingress class-
maps for two different traffics classified under the policy map
my-ingress-policy
Now we have defined the previously configured egress class-
maps for two different traffics classified under the policy map
my-egress-policy
Enterprise Engineering Solutions 19
20. Now it’s time to implement the configured queuing policies on the interface or vlan database:
#interface Ethernet 1/1
#service-policy type queuing input my-ingress-policy
#service-policy type queuing output my-egress-policy
Continued…
Enterprise Engineering Solutions 20
21. Some important points to remember:
• Class maps are defined separately for QoS and queuing.
• Policy map, similary, are configured separately for QoS and queuing.
• System QoS is configured system wide.
• Service policy is the way to map the policy map on an interface or a vlan database.
• A separate policy map is required for ingress and egress traffic.
• Ingress policy maps will have ingress class maps and egress policy maps would have egress class maps.
• The service policy would not apply on an interface if the auto-negotiation is on.
• There are default class-maps and policy-maps configured and applied on all interfaces by default.
• The N7K assigns traffic to queues based on CoS even if the egress interface does not carry CoS in the frame.
• Interface based QoS takes precedence over VLAN based QoS.
• VLAN based QoS policy is configured in the vlan database, no SVI is required.
Enterprise Engineering Solutions 21
22. Where can I configure the class and policy maps?
• Class map for queue selection are done in the admin/default VDC and apply to all interfaces across all VDCs.
• Policy map are configured on per VDC and are assigned on a per-port or per-vlan basis.
Enterprise Engineering Solutions 22