Testing Egress Marking in NX-OS QoS

Author
Carole Warner Reece
Architect

Updated: 09/18/2012
I had been unsuccessful in my attempts to implement egress marking on a Nexus 7000 running NX-OS 5.2(4). Outbound policy-maps for marking are supposed to be supported in NX-OS 5.x, as stated in the Cisco documentation here http://www.cisco.com/en/US/docs/switches/datacenter/sw/5_x/nx-os/qos/configuration/guide/marking.html#wp1062618 :

You can apply the marking instructions in a QoS policy map to ingress or egress packets by attaching that QoS policy map to an interface. To select ingress or egress, you specify either the input or output keyword in the service-policy command.

I’ll show you my lab results – perhaps you can spot the issue.  (In Testing Egress Marking in NX-OS QoS – Part 2, I’ll discuss why initially outbound marking did not work, and what else was needed.)

Basic Topology

I connected a pair of N7Ks with a trunked link and a Layer 3 link, and configured one VLAN and SVI to simulate one class of traffic. The lab topology looks like this:

2012_09_11_nx-os-egress-policy-map

The Layer 3 link between the N7Ks will be used to test egress marking.

Note: You cannot apply outbound policy maps to Layer 2 interfaces.

N7K-1 has a default route to 10.12.22.2 on N7K-2, 65K has as default route to 10.22.22.2 on N7K-2.

Classification ACLs

I reused a simplified ACL structure from Deny Equals Permit in NX-OS QoS ACLs:

! QoS Trust Boundary Access-Lists
!
ip access-list QOS-VOICE
permit ip any 10.120.11.0 0.0.0.255
permit ip 10.120.11.0 0.0.0.255 any
!

QoS Class-Maps for Classification

I made some basic class-maps and the corresponding policy-maps, one set to mark traffic on the 7Ks, one set to verify the markings on N7K-2.

! identify the voice traffic to be marked
class-map type qos match-any IN-VOICE
description Voice/VoIP/IPT
match access-group name QOS-VOICE
!

! identify marked traffic
class-map type qos match-all DSCP46
match dscp 46
class-map type qos match-all DSCP1
match dscp 1
!

QoS Policy-Maps for Classification

Here are the policy-maps that will be used to mark incoming traffic according to the previous classification ACLs and class-maps, and to verify the markings of the traffic received.

! used to mark in-bound traffic from 65K on N7K-2
policy-map IN-MARKING
  description Inbound classification/marking policy for trust boundaries.
  class IN-VOICE
    set dscp ef
!

!
! used to remark traffic on N7K-1
policy-map type qos CHANGE-DSCP
class DSCP46
set dscp 1
!

!
! used to verify traffic markings on N7K-2
policy-map type qos IN-DSCP
class DSCP46
set dscp 46
class DSCP1
set dscp 1
!

Applying the Policy-Maps on N7K-2

I applied the IN-MARKING and the IN-DSCP policy-maps on N7K-2.

!
interface eth 1/15
service-policy input IN-MARKING
!
interface eth 2/10
service-policy input IN-DSCP
!

Verifying the Basic Marking

Next, a quick ping test from 65K to VLAN 11 on N7K-1.

65K#ping 10.120.11.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.120.11.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
65K#

. . .
N7K-2(config-if)# sh pol int e2/10


Global statistics status : enabled

Ethernet2/10

Service-policy (qos) input: IN-DSCP
SNMP Policy Index: 285213031

Class-map (qos): DSCP46 (match-all)

Slot 2
5 packets 590 bytes
5 minute offered rate 0 bps

Aggregate forwarded :
5 packets 590 bytes
Match: dscp 46
set dscp 46

Class-map (qos): DSCP1 (match-all)

Aggregate forwarded :
0 packets
Match: dscp 1
set dscp 1

. . .
! looks fine

Testing Ingress Re-Marking on N7K-1
Next, apply ingress re-marking policy on N7K-1 and confirm it works as expected.
 

!
N7K-1(config)# int e2/9
N7K-1(config-if)# ser in CHANGE-DSCP
N7K-1(config-if)#

. . .
65K#ping 10.120.11.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.120.11.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
65K#

. . .
N7K-2# sh pol int e1/10


Global statistics status : enabled

Ethernet1/10

Service-policy (qos) input: IN-DSCP

Class-map (qos): DSCP46 (match-all)

Slot 2
 5 packets 590  bytes
 5 minute offered rate 0 bps

Aggregate forwarded :
5 packets 590 bytes
Match: dscp 46
set dscp 46

Class-map (qos): DSCP1 (match-all)

Slot 2
5 packets 590 bytes
5 minute offered rate 0 bps

Aggregate forwarded :
5 packets 590 bytes
Match: dscp 1
set dscp 1

That worked as expected – the ping traffic was marked on N7K-2 and re-marked on N7K1.
Testing Egress Re-Marking on N7K-1

!
N7K-1(config)# int e2/9
N7K-1(config-if)# no ser in CHANGE-DSCP
N7K-1(config-if)#
N7K-1(config-if)# int e2/10
N7K-1(config-if)# ser out CHANGE-DSCP
N7K-1(config-if)#

. . .
65K#ping 10.120.11.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.120.11.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
65K#

. . .
N7K-2# sh pol int e1/10


Global statistics status : enabled

Ethernet1/10

Service-policy (qos) input: IN-DSCP

Class-map (qos): DSCP46 (match-all)

Slot 2
10 packets 1180 bytes
  5 minute offered rate 0 bps

Aggregate forwarded :
10 packets 1180 bytes
Match: dscp 46
set dscp 46

Class-map (qos): DSCP1 (match-all)

Slot 2
5 packets 590  bytes
5 minute offered rate 0 bps

Aggregate forwarded :
5 packets 590 bytes
Match: dscp 1
set dscp 1

The egress policy did NOT work – although the ping traffic was marked on N7K-2, it was NOT re-marked on N7K-1.

Summary

Based on the documentation, egress policy maps for marking should work for NX-OS on Nexus 7000s. After going back for some more tests in the lab, I determined that there was an issue with the lab environment – the details will be discussed in the next article Testing Egress Marking in NX-OS QoS – Part 2.

— cwr

_____________________________________________________________________________________________

If you would like some additional on NX-OS QoS, you may want to review the following articles: 

2 responses to “Testing Egress Marking in NX-OS QoS

  1. Carole,

    This is working for me in production on NX-OS 5.2(4). The only significant differences between our setups are the card type and evaluation criteria. My outbound ports are 2x1gb/s port-channels on a N7K-M148GS-11L card, and I am matching on IP address information, not DSCP value.

    ip access-list DCQOS-LIVE-VIDEO
    10 permit udp any 239.192.200.0/28
    !
    class-map type qos match-all CM-LIVE-VIDEO
    match access-group name DCQOS-LIVE-VIDEO
    !
    policy-map type qos DC-EXIT-POLICY
    class CM-LIVE-VIDEO
    set dscp 26
    !
    interface port-channel30
    description Outbound Port-Channel
    mtu 9216
    service-policy type qos output DC-EXIT-POLICY
    ip address 2.2.2.0/31

  2. Jeremy –
    Interesting, I’ll test some more. I was running 5.2(4) as well, but I don’t recall the card type.
    Carole

Leave a Reply

 

Nick Kelly

Cybersecurity Engineer, Cisco

Nick has over 20 years of experience in Security Operations and Security Sales. He is an avid student of cybersecurity and regularly engages with the Infosec community at events like BSides, RVASec, Derbycon and more. The son of an FBI forensics director, Nick holds a B.S. in Criminal Justice and is one of Cisco’s Fire Jumper Elite members. When he’s not working, he writes cyberpunk and punches aliens on his Playstation.

 

Virgilio “BONG” dela Cruz Jr.

CCDP, CCNA V, CCNP, Cisco IPS Express Security for AM/EE
Field Solutions Architect, Tech Data

Virgilio “Bong” has sixteen years of professional experience in IT industry from academe, technical and customer support, pre-sales, post sales, project management, training and enablement. He has worked in Cisco Technical Assistance Center (TAC) as a member of the WAN and LAN Switching team. Bong now works for Tech Data as the Field Solutions Architect with a focus on Cisco Security and holds a few Cisco certifications including Fire Jumper Elite.

 

John Cavanaugh

CCIE #1066, CCDE #20070002, CCAr
Chief Technology Officer, Practice Lead Security Services, NetCraftsmen

John is our CTO and the practice lead for a talented team of consultants focused on designing and delivering scalable and secure infrastructure solutions to customers across multiple industry verticals and technologies. Previously he has held several positions including Executive Director/Chief Architect for Global Network Services at JPMorgan Chase. In that capacity, he led a team managing network architecture and services.  Prior to his role at JPMorgan Chase, John was a Distinguished Engineer at Cisco working across a number of verticals including Higher Education, Finance, Retail, Government, and Health Care.

He is an expert in working with groups to identify business needs, and align technology strategies to enable business strategies, building in agility and scalability to allow for future changes. John is experienced in the architecture and design of highly available, secure, network infrastructure and data centers, and has worked on projects worldwide. He has worked in both the business and regulatory environments for the design and deployment of complex IT infrastructures.