# Class based Qos

**URL:** <https://forum.networklessons.com/t/class-based-qos/4912>\
**Category:** Quality of Service\
**Created:** [September 16, 2018, 3:00pm UTC](https://forum.networklessons.com/t/class-based-qos/4912 "2018-09-16T15:00:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivak80nayan](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@sivak80nayan](https://forum.networklessons.com/u/sivak80nayan)\
**Post date:** [September 16, 2018, 3:00pm UTC](https://forum.networklessons.com/t/class-based-qos/4912/1 "2018-09-16T15:00:29Z")

</div>

I am doing a test for prioritizing SSH and Port 60 traffic using bandwidth shape up to 1.5 Mbps over 2 Mbps backhaul link, other traffic should pass through remaining BW = 512 kbps, and I would apply this QoS (service policy) in backhaul router WAN interface. how do I achieve this with Cisco QoS.

 ![QOS-Sample%20diagram](https://cdn-forum.networklessons.com/uploads/default/original/2X/8/888097c5efb10eabda89171dad5ee75d0a2fd7ee.jpeg)

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [September 17, 2018, 5:52am UTC](https://forum.networklessons.com/t/class-based-qos/4912/2 "2018-09-17T05:52:16Z")

</div>

Hello Sivakumar

I suggest you go through Rene’s section on QoS and traffic shaping and see if you can apply some of the concepts there to your topology. Take a look at:

> **[Traffic Shaping on Cisco IOS](https://networklessons.com/quality-of-service/traffic-shaping-on-cisco-ios)**
>
> This lesson explains how to configure traffic shaping on Cisco IOS routers. This allows you to buffer traffic instead of dropping it.

as well as at the various other [QoS lessons](https://networklessons.com/quality-of-service/).

Once you make your attempt, if you hit a snag or have any more specific questions, we’re here to help!

I hope this has been helpful!

Laz

---

<div class="post-metadata">

**Author:** ![sivak80nayan](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@sivak80nayan](https://forum.networklessons.com/u/sivak80nayan)\
**Post date:** [September 17, 2018, 8:31am UTC](https://forum.networklessons.com/t/class-based-qos/4912/3 "2018-09-17T08:31:51Z")

</div>

Thanks for the reply. Yes I gone through Rene’s Qos shaping, but that steps will not work in 15(4) IOS, I can’t associate service policy directly to the interface instead need to create parent child policy and associated to the interface. Please help to create Parent child policy where I can prioritize and BW shaped

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [October 15, 2018, 11:48am UTC](https://forum.networklessons.com/t/class-based-qos/4912/4 "2018-10-15T11:48:43Z")

</div>

Hi Sivakumar,

You can’t configure a priority queue and shape in a single policy-map. You’ll need a nested policy for that. Here’s an example:

```
ip access-list extended TCP_60
 permit tcp any any eq 60

class-map match-any PRIORITY
 match access-group name TCP_60
 match protocol ssh

policy-map PRIORITY
 class class-default
  priority 1000
  
policy-map SHAPER
 class PRIORITY
  shape average 1500000
   service-policy PRIORITY

```

The parent policy is a shaper for SSH / TCP 60 traffic and it shapes up to 1.5 Mbps. The sub-policy (PRIORITY) has a priority queue. I’ve set it to 1 Mbit.

All SSH / TCP 60 traffic is shaped up to 1.5 Mbit and prioritized up to 1 Mbit. Why do you want to shape up to 1.5 Mbit btw? Do you want to prevent drops from when you exceed 2 Mbit?

In that case, it would make more sense to configure it like this:

```
policy-map SHAPE_ALL
 class class-default
  shape average 2000000   
   service-policy PRIORITY

policy-map PRIORITY
 class PRIORITY
  priority 1500

```

Now you shape everything up to 2 Mbit. Within the shaper, the sub-policy adds a priority queue for your SSH and TCP\_60 traffic.

Rene
