The (Unofficial) CCNP-SP Study Guide
  • About
    • About the Author
    • About This Study Guide
  • MPLS
    • LDP
      • LDP Transport Address
      • LDP Conditional Advertisement
      • LDP Authentication
      • LDP/IGP Sync
      • LDP Session Protection
    • MPLS-TE
      • MPLS-TE Basics, Pt. 1 (TED)
      • MPLS-TE Basics, Pt.2 (RSVP)
      • MPLS-TE Basics, Pt.3 (CSPF)
      • MPLS-TE Basics, Pt.4 (Routing)
      • MPLS-TE Fast Reroute (FRR)
      • MPLS-TE with OSPF
    • Unified MPLS
    • Segment Routing
      • Introduction, Theory Pt.1
      • Introduction, Lab (OSPF) Pt.2
      • Introduction, Lab (ISIS) Pt. 3
      • Multi-Area/Level Segment Routing
      • Segment Routing using BGP
      • Migrating LDP to SR
      • LDP/SR Interworking
      • TI-LFA Pt. 1 (Theory)
      • TI-LFA Pt. 2 (Implementation)
      • TI-LFA Pt. 3 (Node and SRLG Protection)
      • SR-TE Pt. 1 (Overview)
      • SR-TE Pt. 2 (Creating an SR-TE Policy)
      • SR-TE Pt. 3 (Using a PCE)
      • SR-TE Pt. 4 (Automated Steering)
      • SR-TE Pt. 5 (On-Demand Nexthop)
      • SR-TE Pt. 6 (Flex Algo)
    • MPLS OAM
      • Classic Traceroute Behavior in MPLS Networks
      • LSP Ping
      • LSP Traceroute
  • Routing
    • BGP
      • BGP Synchronization
      • BGP Load Sharing (Multipath)
      • An Intuitive Look at Path Attributes
      • AS Path Prepending on XE and XR
      • RPL
    • BGP Security
      • BGP TTL Security, Pt. 1
      • BGP TTL Security, Pt. 2 (IOS-XE)
      • BGP TTL Security, Pt. 3 (IOS-XR)
      • BGP MD5 Authentication
      • BGP Maximum Prefixes
      • BGP RFD (Route Flap Dampening)
      • RTBH
      • Flowspec
      • BGPsec
    • L3VPN
      • An In-Depth Look at RD and RT, Pt. 1
      • An In-Depth Look at RD and RT, Pt. 2
      • An In-Depth Look at RD and RT, Pt. 3
      • An In-Depth Look at RD and RT, Pt. 4
      • Inter-AS L3VPN Pt. 1, Overview
      • Inter-AS L3VPN Pt. 2, Option A
      • Inter-AS L3VPN Pt. 3, Option B
      • Inter-AS L3VPN Pt. 4, Option C
      • CSC (Carrier Supporting Carrier)
      • PE NAT
    • OSPF
      • Type 7 to Type 5 Translation
      • OSPF Authentication
      • Troubleshooting OSPF Adjacencies
      • OSPFv3 LSA Types
      • OSPFv3 LSAs Example (Single Area)
    • ISIS
      • The Potential for Asymmetric Routing with Multi-Area ISIS
      • Interarea Routing is Distance-Vector
      • Basic ISIS - LSPDB
      • Multitopology
      • What is the role of CLNS and CLNP in ISIS?
      • Troubleshooting ISIS Adjacencies
    • IPv6 Transition
      • Overview
      • NAT64
      • 6to4
      • 6RD (IPv6 Rapid Deployment)
      • DS Lite (Dual Stack Lite)
      • MAP (Mapping of Address and Port)
      • Tunneling IPv6 Dynamic Routing Protocols over IPv4
    • Multicast
      • Introduction
      • IP and MAC Addressing
      • Tree Formation and Packet Forwarding
      • IGMP
      • PIM-DM (Dense Mode)
      • PIM-SM (Sparse Mode)
      • PIM-SM SPT Switchover
      • PIM-SM Tunnel Interfaces
      • PIM DR and the Assert Message
      • PIM-SM RP Discovery
      • PIM-BiDir
      • PIM-SSM (Source-Specific Multicast)
      • Interdomain Multicast (PIM-SM)
      • IPv6 Multicast
      • mVPN Introduction
      • mVPN Profile 0
      • mVPN Profile 1
      • Multicast Routing on IOS-XR
  • L2VPN & Ethernet
    • IOS-XE Ethernet Services
      • Service Instances
      • E-Line
      • E-LAN (VPLS)
      • E-Tree
      • E-Access
      • VPLS with BGP Autodiscovery
      • Martini/Kompella Circuits
    • EVPN
      • Introduction to EVPN
      • Learning EVPN VXLAN First
      • E-Line (EVPN VPWS)
      • E-Line (EVPN VPWS) on IOS-XR
      • E-Line (EVPN VPWS) Multi-Homed
      • E-LAN (EVPN Single-Homed)
    • Carrier Ethernet
      • 802.1ah (MAC-in-MAC)
      • 802.3ah (Ethernet OAM)
      • 802.1ag (CFM)
      • Cisco REP (Resilient Ethernet Protocol)
      • ITU G.8032 ERPS (Ethernet Ring Protection Switching)
  • Security
    • CoPP (Control Plane Policing)
    • LPTS (Local Packet Transport Services)
  • Misc
    • QoS
      • QoS Introduction (Part 1)
      • QoS Tools Overview and QoS Models (Part 2)
      • QoS Classification and Marking (Part 3)
      • QoS Queuing/Congestion Management (Part 4)
      • QoS Shaping and Policing (Part 5)
      • QoS for IPv6
      • MPLS QoS Basics
      • MPLS QoS Modes
      • MPLS TE QoS (DS-TE)
      • MPLS TE CBTS/PBTS
    • Automation and Assurance
      • NSO
      • NSO Command Cheat Sheet
      • Intro to YANG/NETCONF
      • YANG In-Depth
      • NETCONF In-Depth
      • RESTCONF
      • Model-Driven Telemetry
      • Automation Tool Comparison
      • Netflow
      • SNMP
    • Virtualization
      • NFV (Network Function Virtualization)
      • OpenStack
    • Transport
      • xPON
      • SONET/SDH
      • WDM
      • 4G and 5G RAN
    • High Availability (HA)
      • NSF/GR
      • NSR
      • NSF/NSR Whitepapers
      • BFD
      • Link Aggregation on IOS-XE
      • Link Aggregation on IOS-XR
    • IOS Software Overview
  • Labs
    • Lab Challenges
      • How to Use These Labs
      • Basic LDP
      • Advanced LDP
      • BGP Security
      • Unified MPLS
      • BGP Fundamentals
      • Ethernet Services
      • L3VPN Extranet
      • Multicast
      • Inter-area OSPF
      • ISIS
      • MPLS-TE
      • Control Plane Policing
      • QoS
Powered by GitBook
On this page
  • MPLS EXP Mapping
  • Matching/Marking IPv6 Traffic Class
  • IPv6 Flow Label
  • Further Reading
  1. Misc
  2. QoS

QoS for IPv6

PreviousQoS Shaping and Policing (Part 5)NextMPLS QoS Basics

Last updated 2 years ago

QoS for IPv6 works almost identically to IPv4. The IPv6 header has a Traffic Class field which is identical to the IPv4 DiffServ Field.

Below, the DSCP value in the IPv6 packet has been set to EF. The IPv6 Traffic Class field is 8 bits in length. The first six bits are used for the DSCP value, and the last two bits are used for ECN.

This is identical to the IPv4 Differentiated Services Field, shown below for reference:

MPLS EXP Mapping

Just like IPv4 traffic, when an MPLS label stack is imposed on an IPv6 packet, the IPP (first three bits of the DSCP value) are mapped to the EXP value by default. You can think of the MPLS EXP interaction with IPv6 as identical to how IPv4 works.

Matching/Marking IPv6 Traffic Class

The classification and marking commands for IPv6 are the exact same as the commands you use for IPv4.

The classification command for matching IPP or DSCP works for both IPv4 and IPv6 traffic.

R1(config)#class-map example
R1(config-cmap)#match ?
  <snip>
  dscp                 Match DSCP in IPv4 and IPv6 packets
  <snip>
  precedence           Match Precedence in IPv4 and IPv6 packets

Likewise, marking the IPP or DSCP value of an IPv6 packet uses the same command as for IPv4 packets.

R1(config)#policy-map example
R1(config-pmap)#class class-default
R1(config-pmap-c)#set ?
  dscp           Set DSCP in IP(v4) and IPv6 packets
  precedence     Set precedence in IP(v4) and IPv6 packets

IPv6 Flow Label

The only difference between IPv4 and IPv6, in terms of QoS, is that IPv6 has a flow label field. This is 20 bits and is placed directly after the Traffic Class field.

As far as I can tell, this is not intended to be used for QoS these days. Therefore it is a little strange that this field is listed on the SPCOR blueprint in section 1.4.e under Describe QoS Architecture.

Originally, this field does appear to have been intended for QoS. RFC2460, publicished in 1998, says this about the Flow label:

   The 20-bit Flow Label field in the IPv6 header may be used by a
   source to label sequences of packets for which it requests special
   handling by the IPv6 routers, such as non-default quality of service
   or "real-time" service.  This aspect of IPv6 is, at the time of
   writing, still experimental and subject to change as the requirements
   for flow support in the Internet become clearer.

However, the flow label was never really implemented for QoS. We have more than enough DSCP values to use for traffic that requires special QoS treatment.

RFC6437, published in 2011, is specifically about the IPv6 Flow Label. In this RFC, the purpose of the Flow label is defined as the following:

   The usage of the Flow Label field enables efficient IPv6 flow
   classification based only on IPv6 main header fields in fixed
   positions.

This makes much more sense. A flow label can simply identify a flow, instead of a router needing to match flows based on identical layer 3 and layer 4 information. The router can more efficiently hash flows for ECMP by only reading the flow label. In fact, RFC6437 makes no mention of QoS at all!

Additionally, the flow label cannot be matched or marked using the MQC on IOS. So it is pretty clear that the flow label is not a QoS mechanism, and instead it is used as an ECMP mechanism to ease the burden of flow classification on routers.

Further Reading

https://www.rfc-editor.org/rfc/rfc6437
https://ccie-or-null.net/tag/ipv6-flow-label/
https://www.youtube.com/watch?v=b0CRjOpnT7w&ab_channel=NANOG