Modular QoS Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Release

PDF

Modular QoS Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Release

QoS marking on Layer 2 subinterfaces

Want to summarize with AI?

Log in

Provides instructions for QoS marking on Layer 2 interfaces and subinterfaces, including MQC policy use, CoS and DEI remarking, traffic classification, and egress policy verification.


QoS marking on Layer 2 subinterfaces is a QoS traffic differentiation feature that

  • enables per-subinterface traffic classification and marking on Layer 2 transport interfaces

  • applies CoS-based marking directly on Layer 2 frames

  • supports marking of Layer 2 Ethernet packets in the ingress and egress directions, and

  • ensures independent QoS policy enforcement for each subinterface within a physical port or bundle.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

Classification and Marking for L2 Traffic

Release 26.1.1

Introduced in this release on: Centralized Systems (8400 [ASIC: K100]) (select variants only*)

*This feature is now supported on the Cisco 8404-SYS-D routers.

Classification and Marking for L2 Traffic

Release 25.4.1

Introduced in this release on: Fixed Systems (8010 [ASIC: A100])(select variants only*)

*This feature is supported on:

  • 8011-32Y8L2H2FH

  • 8011-12G12X4Y-A/D

Classification and Marking for L2 Traffic

Release 25.1.1

Introduced in this release on: Fixed Systems (8010 [ASIC: A100])(select variants only*)

*This feature is supported on Cisco 8011-4G24Y4H-I routers.

Classification and Marking for L2 Traffic

Release 24.4.1

Introduced in this release on: Fixed Systems (8200 [ASIC: P100], 8700 [ASIC: P100, K100])(select variants only*); Modular Systems (8800 [LC ASIC: P100])(select variants only*)

*This feature is now supported on:

  • 8212-48FH-M

  • 8711-32FH-M

  • 8712-MOD-M

  • 88-LC1-36EH

  • 88-LC1-12TH24FH-E

  • 88-LC1-52Y8H-EM

Classification and Marking for L2 Traffic

Release 7.7.1

You can now perform packet remarking on Layer 2 subinterfaces. Traffic marking allows you to fine tune the traffic attributes on your network. The increased granularity helps single out traffic that requires special handling, and achieves optimal application performance.


Configure QoS marking on Layer 2 subinterfaces

Before you begin

Complete these prerequisites before you begin:

  • Enable Layer 2 service on the device or subinterface as needed. For configuration details, refer to the L2VPN Configuration Guide.

  • Prepare the class maps and policy maps used for ingress classification and egress remarking. For more information, refer to the Create a Traffic Class section in the Classify Packets to Identify Specific Traffic chapter.

Follow these steps to configure QoS marking on Layer 2 subinterfaces.


Configure QoS marking on Layer 2 main interfaces

Before you begin

Complete these prerequisites before you begin:

  • Enable Layer 2 service on the device or main interface as needed. For configuration details, refer to the L2VPN Configuration Guide.

  • Prepare the class maps and policy maps used for ingress classification and egress remarking. For more information, refer to the Create a Traffic Class section in the Classify Packets to Identify Specific Traffic chapter.

Follow these steps to configure QoS marking on Layer 2 main interfaces.

Procedure

  1. Create an ingress policy to classify traffic and set internal qos-group values.

    This policy assigns traffic classes and associates each class with a traffic-class and qos-group value for later egress remarking.

    Example:

    
    Router# configure terminal 
    Router(config)# policy-map INGRESS_L2_AC 
    Router(config-pmap)# class CONTROL_PLANE 
    Router(config-pmap-c)# set traffic-class 7 
    Router(config-pmap-c)# set qos-group 27 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class VOIP 
    Router(config-pmap-c)# set traffic-class 6 
    Router(config-pmap-c)# set qos-group 26 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class VIDEO_STREAM 
    Router(config-pmap-c)# set traffic-class 5 
    Router(config-pmap-c)# set qos-group 25 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class TRANSACTIONAL_DATA 
    Router(config-pmap-c)# set traffic-class 4 
    Router(config-pmap-c)# set qos-group 24 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class DB_SYNC 
    Router(config-pmap-c)# set traffic-class 3 
    Router(config-pmap-c)# set qos-group 23 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class BULK_DATA 
    Router(config-pmap-c)# set traffic-class 2 
    Router(config-pmap-c)# set qos-group 22 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class SCAVENGER 
    Router(config-pmap-c)# set traffic-class 1 
    Router(config-pmap-c)# set qos-group 21 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class class-default 
    Router(config-pmap-c)# end-policy-map  
    Router(config)# commit 
    
  2. Create an egress policy to remark frames based on qos-group classification.

    Map each qos-group to the desired Layer 2 CoS and DEI marking for egress.

    Example:

    
    Router# configure terminal 
    Router(config)# policy-map REMARK_EGRESS_QG_L2_AC 
    Router(config-pmap)# class QoS_GROUP_27 
    Router(config-pmap-c)# set cos 7 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class QoS_GROUP_26 
    Router(config-pmap-c)# set cos 7 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class QoS_GROUP_25 
    Router(config-pmap-c)# set cos 5 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class QoS_GROUP_24 
    Router(config-pmap-c)# set cos 5 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class QoS_GROUP_23 
    Router(config-pmap-c)# set cos 3 
    Router(config-pmap-c)# set dei 0 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class QoS_GROUP_22 
    Router(config-pmap-c)# set cos 3 
    Router(config-pmap-c)# set dei 1 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class QoS_GROUP_21 
    Router(config-pmap-c)# set cos 1 
    Router(config-pmap-c)# set dei 1 
    Router(config-pmap-c)# exit 
    
    Router(config-pmap)# class class-default 
    Router(config-pmap-c)# set dei 1 
    Router(config-pmap-c)# exit 
    Router(config)# commit 
    
  3. Configure Layer 2 transport mode and attach the egress policy to the main interface.

    Example:

    Router(config)# interface HundredGigE0/0/0/23
    Router(config-if)# l2transport
    Router(config-if-l2)# service-policy output REMARK_EGRESS_QG_L2_AC
    Router(config-if-l2)# no shutdown
    Router(config-if-l2)# commit

    The egress remarking policy is now active on the untagged Layer 2 main interface.

  4. Verify egress remarking on the Layer 2 main interface.

    Confirm class counters and transmitted byte rates for each qos-group class on the main interface.

    Example:

    Router# show policy-map interface HundredGigE0/0/0/23 output
                
                HundredGigE0/0/0/23 output: REMARK_EGRESS_QG_L2_AC
                
                Class QoS_GROUP_7
                Classification statistics          (packets/bytes)     (rate - kbps)
                Matched             :            21319554/29847375600          985424
                Transmitted         :            21319554/29847375600          985424
                Total Dropped       :                   0/0                    0
                Class QoS_GROUP_6
                Classification statistics          (packets/bytes)     (rate - kbps)
                Matched             :            21581741/30214437400          997540
                Transmitted         :            21581741/30214437400          997540
                Total Dropped       :                   0/0                    0
                Class QoS_GROUP_5
                Classification statistics          (packets/bytes)     (packets/bytes)     (rate - kbps)
                Matched             :           106597824/149236953600         4927114
                Transmitted         :           106597824/149236953600         4927114
                Total Dropped       :                   0/0                    0
                Class QoS_GROUP_4
                Classification statistics          (packets/bytes)     (rate - kbps)
                Matched             :           490350115/686490161000         22664721
                Transmitted         :           490350115/686490161000         22664721
                Total Dropped       :                   0/0                    0
                Class QoS_GROUP_3
                Classification statistics          (packets/bytes)     (rate - kbps)
                Matched             :                   0/0                    0
                Transmitted         :                   0/0                    0
                Total Dropped       :                   0/0                    0
                Class QoS_GROUP_2
                Classification statistics          (packets/bytes)     (rate - kbps)
                Matched             :                   0/0                    0
                Transmitted         :                   0/0                    0
                Total Dropped       :                   0/0                    0
                Class QoS_GROUP_1
                Classification statistics          (packets/bytes)     (rate - kbps)
                Matched             :                   0/0                    0
                Transmitted         :                   0/0                    0
                Total Dropped       :                   0/0                    0
                Class class-default
                Classification statistics          (packets/bytes)     (rate - kbps)
                Matched             :          1087299229/1522218920600        50256530
                Transmitted         :          1087299229/1522218920600        50256530
                Total Dropped       :                   0/0                    0
                
                Policy Bag Stats time: 1657531125148  [Local Time: 07/11/22 09:18:45.148]