Professional Documents
Culture Documents
End-to-End QoS
Implementation and Operation
with Nexus
Nemanja Kamenica
Technical Marketing Engineer
Session Objectives
• Provide a refresh of QoS Basics
• Understand the basic switch
architecture for the Nexus switch
family
• Provide a detailed understanding
of QoS on Nexus platforms
• Lear how to configure QOS on
Nexus devices through real-
world configuration examples
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
Session Non-Objectives
• Data Center QoS Methodology
• Nexus hardware architecture deep-dive
• Application Centric Infrastructure (ACI) QOS
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 5
Cisco Webex Teams
Questions?
Use Cisco Webex Teams (formerly Cisco Spark)
to chat with the speaker after the session
How
1 Find this session in the Cisco Events Mobile App
2 Click “Join the Discussion”
3 Install Webex Teams or go directly to the team space
4 Enter messages/questions in the team space
cs.co/ciscolivebot#BRKDCN-3346
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
Congestion Happens Everyday!
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Why QoS in the Data Center?
Assign Manage Maximize
Color to Traffic Congestion Throughput
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Can Traffic Control help …
… or confuse
… or hurt
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
25nd Anniversary
The QoS Toolset
Queuing &
Classification Policing Marking Shaping
Scheduling
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Classification and Marking – Two sides of a coin
• Identify traffic lync
mgmt p2p
Video
• DSCP Before: VoIP
HTTP
• IP PREC Uncontrolled Bandwidth email
App1
vmotion
• CoS backup
• ACLs
• Re-map Traffic
• Like to Like (i.e. CoS to CoS) VoIP/Lync
• Like to Unlike (i.e. DSCP to COS) After: Email/HTTP
• Needs mapping tables Controlled Bandwidth SAP
• Also called Mutation
Backup
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
Policing – Limit Misbehaving Traffic
• Single rate Two Color Policer Tokens
Excess Traffic
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
Congestion Management Tools
• Buffering
• Storing packets in memory
• Queuing
• Buffering packets according to
traffic class
• Scheduling
• Order of transmission of buffered
packets
• Shaping
• Smooth burst traffic
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
Buffering – Why do we need it?
• Many to One Conversations
• Client to Server
• Server to Storage
• Aggregation Points
• Speed Mismatch
• Client to WAN to Server
10 GE 10 GE 1 GE
1 GE
1 GE
1 GE
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
4 Class Queuing Model example
Priority 5-7 PQ
No-Drop 3, 4 Q2
Best-Effort 0, 1 Default-Q
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
8 Class Queuing Model
Class DSCP Queues
Priority CS6 (CS7)
PQ
Platinum EF • Matches often a Campus
Gold AF41 Q7 QoS concept
Silver CS4 Q6 • No-Drop still with CoS3
(DSCP 24-30 are “unusable”)
No-Drop CoS3 Q5
Bronze AF21 Q4 • Valid but most complex
Manageme
CS2 Q3
nt
Scavenger AF11 Q2
Bulk Data CS1 Q1
Best-Effort 0 Default-Q
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
Scheduling – Who goes first?
• Defines Order of transmission
• The Priority-Queue always
serviced first
• Normal Queues serviced only
after Priority Queue empty
• Different Scheduling algorithms
for normal queues
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Common Scheduling Algorithms
• Deficit Weighted Round Robin • Round Robin (RR)
• Variable sized packets • Simple and Easy to implement
• Uses a deficit counter • Starvation-free
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Congestion Avoidance Tools
• Tail Drop (TD)
• Drop packets at tail of the queue
• Single threshold per queue
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
Putting it all together! COS Queue
1 2 5, 6, 7 PQ1
Packet is placed in the Egress Priority Queue
Queue according to CoS/DSCP always served first 3, 4 Q3
value.
2 Q2
Egress Port
Normal Queue 0, 1 Q-
4
Default
Normal Queues have
Drop Threshold 4 Threshold and drop
PQ1 packet accordingly
Drop Threshold 3
Drop Threshold 2
Q2
Scheduler
Drop Threshold 1
3
DWRR
DSCP [24]
data L3
Normal Queues
L2
CoS [3] Q3 served after PQ is
empty according to
Scheduler
Q-Default
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Head of Line Blocking
What is the Problem?
Crossbar
Ingress Module Fabric Egress Module
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Virtual Output Queues
Avoid Head of Line Blocking
Ingress
VOQ
Crossbar
Ingress Module Fabric Egress Module
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
Virtual Output Queues
Avoid Head of Line Blocking
Ingress
VOQ
Crossbar
Ingress Module Fabric Egress Module
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Buffering on Nexus Models compared
VOQ
Output Queue Buffer
Virtual Output Queue
Input buffer for every egress port Shared buffer for N egress ports
NxN buffer size N buffer size
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
Nexus uses Modular QOS CLI (MQC)
3 Block Construct
Class-Map
Network-QoS Network-QoS
• CoS Network-QoS
• Congestion-Control
• Protocol (FCoE) • System-qos
• Pause / MTU per VL
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
Network-QoS Policy
• Define global queuing and scheduling parameters for all interfaces in
switch
• Identify drop/no-drop classes, MTU and WRED/TD, etc.
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 33
System based Policy attachment
• System based QoS Policy gets
globally applied to all interfaces
and VLAN
Routed Port
Access Port
• System based QoS Policy is 802.1q Trunk
VLAN
802.1q Trunk
Service Policy
applied to the
VLAN Database
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
VLAN based QoS Policy attachment
• VLAN based QoS Policy is Routed Port
802.1q Trunk
Service Policy
applied to the
VLAN Database
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
Interface based QoS Policy attachment
• Interface based QoS Policy takes Routed Port
Service Policy
policy
precedence over VLAN applied to the Access Port
Switchport
switchport… QoS
Policies
• Can also be attached to port- 802.1q Trunk
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 36
Interface based Queuing Policy attachment
• Interface based QoS Policy takes Routed Port
Service Policy
policy
precedence over VLAN applied to the Access Port
Switchport
switchport… QoS
Policies
• Interface based QoS Policy is 802.1q Trunk
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 37
New QoS Capabilities
• Priority Flow Control (802.1Qbb)
• Enables Lossless Ethernet using
per traffic class pause
• During congestion, no-drop priority
is paused
• No effect on other priority values
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 38
DC QoS Capabilities
• DCBXP (802.1Qaz)
• LLDP with new TLV Values
• Negotiates capabilities (like PFC)
with other devices
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
Data Center Converged Infrastructure
• Simplification of the infrastructure
by using Ethernet for data and
storage traffic
• FCoE
• Replaces Fibre Channel stack with
Ethernet
• RoCE
• RoCE extends RDMA capabilities
over Ethernet
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
RoCE vs RoCEv2 (non-drop) FC/FCoE
• Requirement for FCoE and
RoCEv1: FCoE RoCE v1 RoCE v2
• PFC Applications Applications Applications
• ETS FCP RDMA API RDMA API
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 41
To Trust or Not To Trust?
• Data Centre architecture
provides a new set of trust
boundaries
• Virtual Switch extends the trust
boundary into the Hypervisor
• Nexus Switches always trust CoS
and DSCP
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 42
Overlay QOS
Overlay QoS
MPLS network EXP COS DSCP IP
• Mapping between IP priorities pres
COS, DSCP, IP precedence 0 0 0 0
happen on the transition between 1 1 8 1
Ethernet/IP to
MPLS network 2 2 16 2
4 4 32 4
• EXP can be changed in the MPLS
network, it policy map is defined 5 5 40 5
6 6 48 6
7 7 56 7
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 44
Overlay QoS
VXLAN
• On the ingress VTEP original
DSCP is mapped to outer DSCP
value Inner Outer
Inner Outer
data DSCP [24] DSCP [24]
• In VXLAN fabric DSCP in outer
data L3 DSCP [24] L3
DSCP [24] L3 L3
Ethernet header
policy-map type qos marker
class ClassA
set cos 3
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 45
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 46
Nexus 9000 Overview
• Modular and Fixed chassis
• Optimized for high density 10G/25G/40G/100G
• Standalone and ACI Mode
• Built with Cisco Silicon
• Advanced QoS capabilities
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 48
Cisco Nexus 9000 QoS Features
• Traffic classification
• DSCP, CoS, IP Precedence and ACL
• Packet marking
• DSCP, CoS, and ECN
• Strict Priority Queuing and DWRR
• Ingress and egress policing
• Tail Drop and WRED with ECN
• Shared buffer capability
• Egress Queuing
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 49
Buffering – Nexus 9000
• Each ASIC is composed of a number of slice.
Each slice has buffer assigned.
• The buffer is divided in logical pools, where pool
represent class of traffic.
• ASICs implement dynamic queue limit to allow fair
buffer usage to each port.
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 50
What Is a “Slice”?
Slice
Ingress Slice 1 Interconnect
• Self-contained forwarding complex
controlling subset of ports on single Egress Slice 1
ASIC
• Separated into Ingress and Egress Ingress Slice 2
functions
Egress Slice 2
• Ingress of each slice connected to
egress of all slices
• Slice interconnect provides non- Ingress Slice n
blocking any-to-any Egress Slice n
interconnection between slices
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 51
Dynamic Buffer Protection
• Buffer is shared dynamically any queue can
use shared buffer
• Dynamic Buffer Protection prevents any queue
unfair use shared buffer
• The basic algorithm uses dynamic queue
length threshold, and account for usage of
unicast and multicast
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 52
Queuing and Scheduling
50/50 DWRR
UC0 MC0 UC1 MC1 UC2 MC2 UC3 MC3 UC4 MC4 UC5 MC5 UC6 MC6 UC7 MC7
CPU Class 0 Class 1 Class 2 Class 3 Class 4 Class 5 Class 6 Class 7 SPAN
• QOS-group drives class; egress queuing policy defines class priority and weights
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 56
Nexus 9000 CloudScale
Nexus 9000 - Cloud Scale
Slice 0
LSE 900G
• 1.8T chip – 2 slices of 9 x 100G each Slice Interconnect
• X9700-EX modular linecards; 9300-EX TORs
Slice 1 Slice 0
LS1800FX 900G 1.8T
B
B
B
• Each cell is 208bytes Slice 0
208
208
208
208
18.7 MB
B
B
B
B
Slice 1
208
208
208
208
18.7 MB
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 60
LS1800FX Buffer
• Physically each slice divided in
cells
B
B
B
B
• Each cell is 416 bytes
416
416
416
416
• Per slice allocated 44 000 cells
Slice 0
• Single slice 40.8 MB of buffer 40.8 MB
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 61
S 6400 Buffer
• Physically each slice divided in
cells
416 B
416 B
• Each cell is 416 bytes Slice 0
10 MB
Slice 1
10 MB
buffer, total of 40 MB
416 B
416 B
Slice 2 Slice 3
• ECN statistics 10 MB 10 MB
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 62
LS3600FX2 Buffer
• Physically each slice divided
in cells
B
B
B
• Each cell is 416bytes Slice 0
416
208
208
208
416
208
416
416
20 MB
total of 40MB
B
B
B
B
Slice 1
• ECN statistics
208
416
416
416
208
208
416
208
20 MB
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 63
Life of a Packet in Cloud Scale ASIC
Slice Interconnect
Network Interface
Network Interface
Controller Controller Controller Controller
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 64
WRED/ ECN Configuration
• ECN parameters are configurable at per queue level.
• ECN is disabled by default along with WRED
• Packet Threshold below minimum – Transmit
• Packet Threshold between minimum and maximum – Mark ECN bits
• Packet Threshold above maximum – Drop
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 65
Nexus 9000 QoS Configuration Model
• Uses QOS-Groups to tie together QoS,
Queuing and Network-QoS policies
• QoS-Group has no direct relation with
priority values
• QoS-Groups defined (set) in policy-map
type qos.
• QoS-groups referenced (match) in policy
type queuing and policy-map type
network-qos
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 66
Ingress QOS / Egress Queuing Policies
• Default QOS behavior: • To set/change packet markings,
• Trust received QOS markings use “set cos / precedence /
• All user data goes to q-default dscp” in ingress QOS policy
• To select egress queue, use “set • To change queuing behavior,
qos-group” in ingress QOS policy manipulate egress queuing
policies
Ingress QOS policy Egress Queuing policy
set cos
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 67
Putting it all together
Create class-map
Attach policy-map class-map type qos class_foo
type qos and match cos 3-4
match on queuing to
cos/dscp/acls interface policy-map type qos pm1
class type qos class_foo
set qos-group 1
police cir 20 mbytes conform transmit violate drop
class type qos class-default
set qos-group 0
Create policy-map
Create policy-map
type qos and set interface ethernet 1/1
type queuing and service-policy type qos input pm1
qos-group and/or
create actions
add policing rule
class-map type queuing class-foo
match qos-group 1
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 68
Nexus 9000 QoS Golden Rules
• QoS is enabled by default and
cannot
be disabled
• CoS and DSCP are TRUSTED by
default
• Use QoS-Groups to tie policies
together
• Queuing and QoS policies are
applied to a physical interface or
at system level
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 69
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 70
M1
LC
1G / 10G M2
10G / 40G / 100G
M-Series Modules
L2/L3/L4 with large forwarding tables and rich feature set M3
M3 delivers best of M-
and F-series capabilities 10G / 40G / 100G
F1 F2/F2E 10G
10G F3
F-Series Modules
High performance, low latency with streamlined feature set
F3 closes the
F/M feature gap!
10G / 40G / 100G
8 ingress
queues DWRR Port Port 8 egress
Local
Ports
Local
Ports
ASIC queues
per port ASIC SP
DWRR per port
Egress
M2 Module VOQ Structure Egress VOQ Buffer Egress VOQ Buffer Egress Queue Egress Port Buffer
(Credited) (Uncredited) Structure
24-port 10G 1p3q 295KB / port 512KB / 6 ports 1p7q4t 5MB / port
N7K-M224XP-23L
6-port 40G 1p3q 1.2MB / port 1MB / 3 ports 1p7q4t 20.7MB / port
N7K-M206FQ-23L
2-port 100G 1p3q 3MB / port 1MB / port 1p7q4t 30.2MB / port
N7K-M202CF-22L
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 76
F3/M3 – Ingress Buffered
Central Arbiter
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 77
F3/M3 I/O Module Buffering Capacity
Ingress
Module Total VOQ Buffer Ingress Queue Structure Ingress VOQ Buffer
Per Module
Egress
Module Egress VOQ Structure Egress VOQ Buffer (Credited) Egress VOQ Buffer (Uncredited)
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 78
Egress Queuing – Logical View
default-4q-8e-out-policy default-4q4q-8e-out-policy default-4q-7e-out-policy default-4q-6e-out-policy default-4q-4e-out-policy
PQ1 Q2 Q3 Q-Def. PQ1 Q2 Q3 Q-Def. Q2 PQ1 Q3 Q-Def. PQ2. PQ3 PQ1 Q-Def. PQ1 Q-Def. PQ2 Q3
(5,6,7) (3,4) (2) (0,1) (5,6,7) (3,4) (2) (0,1) (3) (5,6,7) (2,4) (0,1) (4) (3) (5,6,7) (0-2) (5,6,7) (0) (4) (1,2,3)
PQ1 (H)
Q2
PQ2 (L)
PQ2 (H)
Egress Port
Egress Port
Egress Port
Egress Port
Egress Port
PQ3 (L)
PQ1
PQ1
PQ1
PQ1
Q-Def
Q-Def
Q-Def
Q-Def
Q-Def
Q3
Q2
Q3
Q2
Q3
Q3
33% 33% 33% 33% 33% 33% 50% 50% 100% 100% 100%
N7k# show system internal ipqos global- N7k# show system internal ipqos global-
defaults | grep -a 12 cos-dscp-map defaults | grep -a 12 dscp-cos-map
table-map: cos-dscp-map (len: 12) table-map: dscp-cos-map (len: 12)
default copy default copy
Bit array: Bit array:
Values set: Values set:
0 8 16 24 32 40 48 56 0 0 0 0 0 0 0 0
-- -- -- -- -- -- -- -- 1 1 1 1 1 1 1 1
-- -- -- -- -- -- -- -- DSCP 24-31 2 2 2 2 2 2 2 2
CoS 2 -- -- -- -- -- -- -- -- mapped to 3 3 3 3 3 3 3 3
--
mapped to -- -- -- -- -- -- -- CoS 3 4 4 4 4 4 4 4 4
--
DSCP 16-23 -- -- -- -- -- -- -- 5 5 5 5 5 5 5 5
-- -- -- -- -- -- -- -- 6 6 6 6 6 6 6 6
-- -- -- -- -- -- -- -- 7 7 7 7 7 7 7 7
Note: Output taken from Nexus 7000
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 80
CoS or DSCP to Queue Mapping
• Default CoS to Queue Mapping for Nexus 7000/7700 (F- and M-Series I/O
Module)
• Ingress: CoS to Queue
• Egress: CoS to Queue
• DSCP to Queue Mapping for Nexus 7000/7700 (F- and M-Series I/O
Module)
• Ingress: DSCP to Queue
• Egress: CoS to Queue
• Global Configuration (Admin/Default VDC) required to enable DSCP to
Queue Mapping:
N7k(config)# hardware qos dscp-to-queue ingress module type {all | f-series | m-series}
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 81
Changing the Default Trust
routed/bridged
CoS
CoS
L3 L3
data q-1 data
L2
CoS [2] L2
CoS [0]
q-default
Set CoS 0
DSCP
DSCP[24]
[0]
(will only set CoS to 0) data L3
L3
L2
CoS [0] Note: CoS is used for egress
queue selection, even if the
egress interface does NOT
Set DSCP 0 carry CoS in the frame
(will set DSCP + CoS to 0)
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 82
Nexus 7000 QoS Golden Rules
• QoS is enabled by default and cannot
be disabled
• CoS and DSCP are TRUSTED by default
• Default Queuing and QoS policies are applied to
all physical interfaces across all VDCs
• For bridged traffic, CoS is preserved, DSCP
is unmodified
• For routed traffic, DSCP is copied to CoS
(first 3 bits)
• Ex: DSCP 40 (b101000) becomes CoS 5 (b101)
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 83
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 84
Nexus 5000 Series Overview
10G\40G Scalability Density
(Large Buffers
Nexus 5600 and Tables) Programmability
High 10G Density Network Visibility
CISCO INNOVATION
Fabric Innovations
CUSTOMER VALUE
40G Flexibility
100G Uplinks
Unified Ports VXLAN
Buffers/Tables
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 86
Key Concepts – Common Points
Nexus 7000 compared to Nexus 5000 QoS
• Nexus 5000/6000 & Nexus 7000 F-Series I/O
Modules share the Ingress Buffer Model
• Ingress buffering and queuing occur at VOQ of each
ingress port
• Egress scheduling enforced by egress port
• No Egress QOS Policies
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 87
Cisco Nexus 5600 QoS Features
• Traffic classification
• DSCP, CoS, IP Precedence and ACL
• Packet marking
• DSCP, CoS, and ECN
• Strict Priority Queuing and DWRR
• Priority Flow Control
• DCBX 802.1Qaz
• Ingress policing (No egress policing)
• Flexible buffer management
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 88
Cisco Nexus 5672UP Internal Architecture
Fabric
Supervisor
Slot 1 Slot 2
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 89
Packet Buffering
• 25MB packet buffer is shared by every three 40 GE ports or twelve 10 GE ports.
• Buffer is 16MB at ingress and 9MB at egress.
• Unicast packet can be buffered at both ingress and egress.
• Multicast Buffered at egress only
Ingress
Unicast VOQ
Egress UPC
UPC
9MB
16MB 224
448
Gbps Unified Gbps
Crossbar
Multicast VOQ
Fabric
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 90
Nexus 5600 QoS Processing
Ingress UPC If Buffer Usage Crosses Threshold: VoQs
Trust CoS/DSCP and • Tail drop for drop class (8 per egress port)
Match on COS/DSCP/ACL • Assert Pause for no-drop COS
Ingress Per-class
Traffic Ingress
MAC Classification
Cos/DSCP Forwarding Buffer Usage
Marking Policing Monitoring
Crossbar
Fabric
Make a forwarding decision Ingress Buffer
Egress Queues
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 91
Flexible Buffer Management
Ingress Buffer
• Shared buffer is good for burst UPC Ingress Buffer (16MB)
absorption.
• Dedicated buffer is good for
SPAN Control
predictable performance for each
port.
• On by default, no configuration Shared Packet Buffer
needed
• Long-distance FCoE, video Port 1 Port 2
Dedicated
Port 3
Dedicated
Dedicated
editing (i.e., AVID), Big Data, and
distributed storage
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 92
Flexible Buffer Management
Egress Buffer
• 9-MB packet buffer is shared
among three 40 GE or twelve UPC Egress Buffer (9MB)
10 GE.
• CLI is provided to allocate buffer
from unicast to multicast. Unicast Buffer
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 95
Default Egress Buffer Allocation
• Software provides CLI to tune the egress buffer allocation.
• At egress, unicast buffer is allocated on a per-port basis. For multicast, the
egress buffer is shared among all ports.
• Use ”hardware multicast-buffer-tune” to assign unicast buffer to multicast
pool on egress
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 96
WRED/ ECN Configuration
• ECN parameters are configurable only at system level.
• ECN is disabled by default along with WRED
• Packet Threshold below minimum – Transmit
• Packet Threshold between minimum and maximum – Mark ECN bits
• Packet Threshold above maximum – Drop
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 97
Nexus 5600/6000 QoS Configuration Model
• Uses QOS-Groups to tie together
QoS, Queuing and Network-QoS
policies
• QoS-Group has no direct relation
with priority values
• QoS-Groups defined (set) in
policy-map type qos.
• QoS-groups referenced (match)
in policy type queuing and
policy-map type network-qos
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 98
Putting it all together
class-map type qos class_foo
Create class-map match cos 3-4
type qos and Attach policy-map
queuing to policy-map type qos pm1
match on class type qos class_foo
cos/dscp/acls interface
set qos-group 1
class type qos class-default
set qos-group 0
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 99
Nexus 5600 QoS Golden Rules
• WRED is enabled by default and cannot be disabled
• CoS and DSCP are TRUSTED by default
• Use QoS-Groups to tie policies together
• No Egress QOS policies
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 101
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 102
Cisco Nexus 3000 QoS Features
• Traffic classification
• DSCP, CoS, IP Precedence and ACL
• Packet marking
• DSCP, CoS, and ECN
• Strict Priority Queuing and DWRR
• Tail Drop and WRED with ECN
• Shared buffer capability
• Egress Queuing
• 3-level hierarchical scheduling
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 104
Hardware Scheduler Implementation
• 3 level scheduling hierarchy
S3 S2 S1
Control
traffic
UC0
UC1
UC winner
UC7
MC0 MC winner
MC3
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 105
Nexus 3132Q-V Architecture
CPU
Management Intel Gladden IVB
16GB DDR3 RAM
Ethernet 2.5 GHz
Dual Core
NVRAM
OBFL
Flash HDD
P
C
H
Console
USB Conn
3
Switch on Chip (SoC)
Power
Supply
FAN / Temp
DeMUX
XLAUI/XFI
4 SFI XLAUI
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 106
Nexus 3100-V – Packet Flow
L2/L3
Parser ACL/QOS
Lookup
Egress Pipeline
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 107
Dynamic Buffer Protection
• Buffer is shared dynamically any queue can
use shared buffer
• Dynamic Buffer Protection prevents any queue
unfair use shared buffer
• The basic algorithm uses dynamic queue
length threshold, and account for usage of
unicast and multicast
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 108
Nexus 3000 QoS Golden Rules
• QoS is enabled by default and
cannot
be disabled
• CoS and DSCP are TRUSTED by
default
• Use QoS-Groups to tie policies
together
• Queuing and QoS policies are
applied to a physical interface or
at system level
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 109
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 110
FEX Overview
• Scalable and Extensible Fabric
• Single point of management
• Homogeneous and consistent policies
By Author listed as "U.S. Air Force photo" [Public domain], via Wikimedia Commons
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 112
Cisco Nexus 2000 QoS Features
• Traffic classification
• DSCP, CoS
• ACL classification (FEX offload) on
Nexus 5600/6000
• Strict Priority Queuing and DWRR
• Priority Flow Control
• Queue-limit Carving
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 113
FEX QoS Policies
• Support for ingress port-based QoS policies on FEX HIF ports
• Support for ingress/egress VLAN-based QoS policies on
FEX VLANs
• FEX QoS policies applied at ingress module of parent switch
• No support for remarking, policing policies
Nexus Parent
Modul Modul
FEX FEX
e/Port e/Port
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 114
FEX QoS Packet Flow Example (CoS2Q)
Nexus Parent
PKT DSCP 0
FEX
COS 0
Module Fabric Module FEX
1Q trunk
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 115
FEX QoS Packet Flow Example (DSCP2Q)
Nexus Parent
PKT DSCP 0
FEX
COS 0
Module Fabric Module FEX
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 116
FEX QoS Packet Flow Example (With Ingress Marking Policy and
COS-to-Queue)
Ingress QoS policy:
policy-map type qos marker
class ClassA
set dscp cs3
!
interface ethernet 101/1/1
service-policy type qos input marker
Ingress queue /
Egress schedule
Ingress queue / egress schedule
Ingress queue at based on COS 3
egress schedule based on COS 3
input port based on
based on COS 0 COS 0
Nexus 7000
PKT DSCP 0
FEX
COS 0
Module
PKT DSCP CS3 COS 3
Fabric Module FEX
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 117
FEX QoS Packet Flow Example (With Ingress Marking Policy and
DSCP-to-Queue)
Ingress QoS policy:
policy-map type qos marker
class ClassA
set dscp cs3
!
interface ethernet 101/1/1
service-policy type qos input marker
Ingress queue /
Egress schedule
Ingress queue / egress schedule
Ingress queue at based on COS 3
egress schedule based on DSCP CS3
input port based on
based on DSCP 0 DSCP 0
Nexus 7700
PKT DSCP 0
FEX
COS 0
Module
PKT DSCP CS3 COS 3
Fabric Module FEX
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 118
FEX Policy Offload (Nexus 5600/6000 only)
• TCAM resources on a FEX to perform ACL-based classification
• The feature is disabled by default
• By default, a FEX classifies packets on CoS value
• Both system level and interface level policies are offloaded to the FEX
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 119
FEX Policy with Nexus9000 as parent
• The FEX QoS policy is applied to the hardware resources of the fabric port
associated with the FEX HIF port
• Classification is based on the COS value.
• System level input queueing for DWRR and Strict priority scheduling for HIF
to NIF traffic and for NIF to HIF traffic
• Queuing:
• 4 queues are present on the FEX
• The scheduling is done per port and each port has its own scheduler.
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 120
FEX Queuing Policies – Nexus 7000
• On Nexus 7000 with FEX + M-Series parent modules, network-qos and F-
series ingress queuing class-maps drive FEX queuing configuration
• Ingress queuing class-maps drive:
• Both ingress and egress COS/DSCP-to-queue mapping
• Enabling DSCP-to-queue on parent switch enables DSCP-to-queue on
FEX
• DSCP-to-queue only active in the HIF→NIF direction
• NIF→HIF direction always uses COS-to-queue mapping, based on COS transmitted
by parent switch to FEX
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 121
FEX Queue-Limit – Nexus 7000
• Provides FEX queue-limit configuration option
• Manages buffer thresholds on FEX based on platform capabilities
• Default has queue-limit enabled
• Configuration applied per-VDC (on Nexus 7000/7700)
• Different FEX models have different capabilities
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 122
Nexus 2000 QoS Golden Rules
• FEX QOS classification on COS or DSCP unless
FEX offload enabled
• FEX queuing driven implicitly by parent switch
queuing configuration
• No support for per-queue shaping, policing or
marking
• Drop thresholds are tail-drop only, no WRED
support
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 123
Agenda
• Introduction
• QoS and Queuing Basics
• QoS Implementation on Nexus
• Nexus 9000 QoS
• Nexus 7000/7700 QoS
• Nexus 5600 QoS
• Nexus 3000 QoS
• Nexus 2000 QoS
• Real World Configuration Examples
• Conclusion
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 124
What do we want to achieve?
Company XYZ’s Business Goals
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 126
Translating to the language of QoS
Queuing Queue-Limit
Application CoS Character
(Scheduling) (Buffer)
BW remaining High Volume /
Best Effort 0, 1 60%
50% Less Important
vMotion / Live BW remaining Medium Volume /
2 10%
Migration 20% Important
BW remaining Medium Volume
Multimedia 3, 4 20%
30% Very Important
Low Volume /
Strict Priority 5 Important /
Priority Queue 10% Delay Sensitive
Low Volume /
Network Control 6,7
Very important
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 127
Topology Core
Nexus 7000 Nexus 7000
M2 cards facing
core and M3/F3
cards facing vpc peer-link
access
VPC from
access to
aggregation Straight-through
FEX, No VPC
Nexus 9000 Nexus 9000 Nexus 5000 Nexus 5000 Nexus 9000
Nexus 9000
vpc peer-link vpc peer-link vpc peer-link
Nexus 2000 Nexus 2000 Nexus 2000 Nexus 2000 Nexus 2000 Nexus 2000
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 128
Classification, Marking & Trust on Nexus 5000/7000/9000 Type:
QoS
Core
Mark Traffic from
Core
(policy-map type qos) vpc peer-link
or just TRUST
(default) Between the
different Tiers,
all ports are
TRUSTED
Mark Traffic
from Servers
(policy-map
type qos)
or just TRUST
(default)
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 129
Type:
QoS
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 130
Type:
QoS
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 131
Type:
Networ-QoS
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 132
Type:
QoS
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 133
Classification Core
& Marking
(Nexus 2000) vpc peer-link
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 134
Queuing Core
(M2-cards) Modify CoS to
Queue mapping
vpc peer-link in Admin-
/Default-VDC
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 135
CoS to Queue Mapping – M2 I/O Module
Example
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 136
Type:
Queuing
Series
vpc peer-link qos policy for 8e-
4q4q i.e 4 ingress
queues
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 140
Type:
Network-QoS
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 142
CoS to Queue Mapping – M3/F3 I/O Module
Example
Queuing
Queue-Limit Queue
Application CoS (Scheduling)- Character
(Buffer)-ingress (Ingress/Egress)
egress
4q1t-8e-4q4q-in-q-default
0,1 BW remaining High Volume /
Best Effort 50% / 1p3q1t-8e-4q4q-out-q-
50% Less Important
default
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 143
CoS to Queue Configuration –M3/F3 slides
Type:
Queuing
Example (Payload-VDC)
qos copy policy-map type queuing default-8e-4q4q-in-policy prefix
Core
Custom-
interface Ethernet1/1
service-policy type queuing input Custom-8e-4q4q-in
Example (Payload-VDC)
Core
interface Ethernet1/1
service-policy type queuing output Custom-8e-4q4q-out
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 147
Type:
Queuing
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 148
Queuing:
Type:
Queuing
vpc peer-link
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 149
Type:
Queuing
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 153
Maximize Throughput and Manage Congestion!
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 154
Recommended Reading
• End-to-End QoS Network
Design: Quality of Service for
Rich-Media & Cloud Networks,
2nd Edition
• Tim Szigeti
• Christina Hattingh
• Robert Barton
• Kenneth Briley
• ISBN-10: 1-58714-369-0
• ISBN-13: 978-1-58714-369-4
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 155
With some help of my friends
I would like to thank all the people, who started the
QoS journey and contributed to it:
• Mike Herbert, Principal Engineer
• Lukas Krattiger, Principal Engineer
• Tim Stevenson, Distinguished Technical Marketing
Engineer
• Matthias Wessendorf,
Technical Marketing Engineer
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 156
Related Sessions
Session Id Session Name
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 157
Cisco Webex Teams
Questions?
Use Cisco Webex Teams (formerly Cisco Spark)
to chat with the speaker after the session
How
1 Find this session in the Cisco Events Mobile App
2 Click “Join the Discussion”
3 Install Webex Teams or go directly to the team space
4 Enter messages/questions in the team space
cs.co/ciscolivebot#BRKDCN-3346
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 184
Complete your online
session survey
• Please complete your Online Session
Survey after each session
• Complete 4 Session Surveys & the Overall
Conference Survey (available from
Thursday) to receive your Cisco Live T-
shirt
• All surveys can be completed via the Cisco
Events Mobile App or the Communication
Stations
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 185
Continue Your Education
BRKDCN-3346 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 186
Thank you