Hands-On Lab: Configuring Basic QoS with Class-Based Marking and Queuing

This hands-on lab configures a class-map and policy-map to classify voice traffic, marks it with DSCP EF, applies a priority queue guaranteeing bandwidth for it, and verifies both the marking and queuing behavior take effect on the outbound interface.

QoS Class-Map Policy-MapDSCP MarkingPriority Queuing Configuration

~3 دقیقه مطالعه · آخرین به‌روزرسانی ۱ مهر ۱۴۰۵

Lab Objective

Configure a class-map matching voice traffic by protocol, mark it with DSCP EF using a policy-map, apply a second policy-map implementing a strict priority queue for that traffic, and verify both the marking and the queuing statistics.

Lab Purpose

Understanding the Modular QoS CLI (MQC) pattern — class-map defines what to match, policy-map defines what to do, service-policy applies it to an interface — is foundational to virtually every QoS configuration, discussed earlier in this series regarding QoS fundamentals.

Lab Topology

R1 ---- Gi0/1 ---- WAN link toward remote site

Voice traffic identified by RTP protocol range,
generated by an IP phone on the LAN side

Task 1: Create a Class-Map Matching Voice Traffic

Create a class-map matching RTP protocol traffic.

Task 2: Create a Marking Policy-Map

Create a policy-map that sets DSCP EF for traffic matching the voice class-map.

Task 3: Apply the Marking Policy Inbound

Apply the marking policy-map to the LAN-facing interface, inbound.

Task 4: Create a Queuing Policy-Map with Priority

Create a second policy-map applying strict priority queuing to the voice class, with a bandwidth guarantee, and default handling for all other traffic.

Task 5: Apply the Queuing Policy Outbound

Apply the queuing policy-map to the WAN-facing interface, outbound.

Task 6: Generate Traffic and Verify Marking and Queuing

Generate voice traffic and confirm both DSCP marking and priority queue statistics.

Solution and Verification

R1(config)# class-map match-all VOICE-TRAFFIC
R1(config-cmap)# match protocol rtp

R1(config)# policy-map MARK-VOICE
R1(config-pmap)# class VOICE-TRAFFIC
R1(config-pmap-c)# set dscp ef

R1(config)# interface gigabitethernet0/0
R1(config-if)# service-policy input MARK-VOICE

R1(config)# policy-map QUEUE-POLICY
R1(config-pmap)# class VOICE-TRAFFIC
R1(config-pmap-c)# priority 128
R1(config-pmap)# class class-default
R1(config-pmap-c)# fair-queue

R1(config)# interface gigabitethernet0/1
R1(config-if)# service-policy output QUEUE-POLICY

IPPhone> [generates an active RTP call]

R1# show policy-map interface gigabitethernet0/0

  Service-policy input: MARK-VOICE
    Class-map: VOICE-TRAFFIC (match-all)
      842 packets, 67360 bytes
      QoS Set
        dscp ef
          Packets marked 842

R1# show policy-map interface gigabitethernet0/1

  Service-policy output: QUEUE-POLICY
    Class-map: VOICE-TRAFFIC (match-all)
      Queueing
      Strict Priority
      Bandwidth 128 (kbps) Burst 3200 (Bytes)
      (pkts matched/bytes matched) 842/67360
      (total drops) 0
-- Zero drops confirms the voice traffic is
-- being serviced immediately by the strict
-- priority queue, exactly as designed

Key Takeaway

The MQC three-step pattern (class-map, policy-map, service-policy) separates classification from action from application — this separation is what allows the same class-map (VOICE-TRAFFIC) to be reused across two entirely different policy-maps in this lab, one for marking and one for queuing, without redefining the matching criteria twice.

نوشته و پژوهش‌شده توسط دکتر شاهین صیامی

مقالات مرتبط

Hands-On Lab: Final Comprehensive CCNP Troubleshooting Challenge (BGP, DMVPN, and QoS Integration)

This hands-on lab presents a complex multi-layer failure across an integrated BGP-over-DMVPN topology combined with QoS marking, requiring systematic diagnosis of a route reflector misconfiguration, an NHRP registration failure, and an incorrectly applied QoS policy simultaneously affecting the same network.

ادامه

Hands-On Lab: Configuring BGP over DMVPN

This hands-on lab runs iBGP as the routing protocol across the same DMVPN hub-and-spoke topology used in the two previous labs, configuring the hub as a route reflector so spokes learn each other's routes without a full iBGP mesh, combining two previously separate concepts into one integrated design.

ادامه

Hands-On Lab: Configuring OSPF over DMVPN

This hands-on lab runs OSPF as the dynamic routing protocol across the same DMVPN hub-and-spoke topology, configuring the tunnel interface as an OSPF point-to-multipoint network type to correctly handle the hub-and-spoke adjacency pattern without requiring the broadcast network type's DR/BDR election.

ادامه

Hands-On Lab: Configuring EIGRP over DMVPN

This hands-on lab runs EIGRP as the dynamic routing protocol across the DMVPN hub-and-spoke topology built in earlier labs, verifying neighbor relationships form correctly across the multipoint tunnel and routes propagate without requiring per-spoke static configuration on the hub.

ادامه

Hands-On Lab: Configuring HSRP MD5 Authentication

This hands-on lab configures MD5 authentication on an HSRP group, verifying two routers with matching authentication strings form a normal active/standby relationship while a router with a mismatched string is excluded from the group entirely.

ادامه

Hands-On Lab: Configuring Cisco Umbrella-Style DNS Security via DNS Forwarding Redirection

This hands-on lab configures a router to redirect all client DNS queries toward a security-focused DNS resolver using DNS forwarding interception, approximating cloud-delivered DNS security enforcement without requiring per-client configuration changes.

ادامه