Bandwidth vs Bandwidth Remaining

Hello,

My name is Rohan, I am a network engineer working with a system integration firm here in NYC, I am having a bit of trouble understanding QOS.

Please if anyone can reach out and help me understand QOS with the application we are using it on, that would gladly be appreciated.

Hello,

My name is Rohan, I am a network engineer working with a system integration firm here in NYC, I am having a bit of trouble understanding QOS.

Please if anyone can reach out and help me understand QOS with the application we are using it on, that would gladly be appreciated.

Hello Rohan,

Qos is a broad topic. What exactly are you trying to achieve and struggling with?

Rene

Hello Rene

Thank you for taking your time to respond to my post, it is truly appreciated. The environment we have currently in the lab are switches from Etherwan and Cisco Cat 9300 - Amsterdam version. The etherwans are currently configured with QOS, which looks like:

Etherwans - Strict Priority + WRR”
Queue3-Strict priority (VLAN300 - COS6)
Queue2- weight of 4 ( VLAN44,VLAN72 - COS5)
Queue1- Weight of 2(COS3,4)
Queue0- Weight of 1(COS1,2)

I want to be able to transfer these QOS settings on the Cisco environment, but I cannot come up with a correct config.
This is what i have currently configured on the switches but I am not seeing the same results as i would on the Etherwans if I oversubscribe traffic.

Current Config on the Cisco Switches 04152022

This is testing only on the Etherwan enviroment:
Etherwan QOS Test_0411.pdf (346.8 KB)

This is testing done by isolating the Cisco enviroment:
CISCO QOS Test_0413.pdf (554.7 KB)

Hello Rohan

I am unfamiliar with Etherwan switches, but looking at the configuration it seems like you are creating a priority queue with weighted round robin for the rest, and you’re acting upon the traffic based on the COS values.

You can achieve the same thing on a Cisco IOS device, and you can follow the process outlined in the following lesson:

The switch model may be different, but the principles and the commands should be the same.

Take a look and see if this helps you to achieve what you need. If you have any further questions, feel free to let us know!

I hope this has been helpful!

Laz

The switches currently being used are the Cat 9300, the link Queuing on Cisco 3560 and 3750 switch are using legacy qos syntax’s.

The above image shows what I believe should be the right config. I am hoping someone can help me understand if it is correct.

Hi @vicko164 ,

Let me shed some light on this. Here’s a topology:

image

I use iperf to generate some traffic. H1 is the client, H2 is the server:

DSCP EF
iperf -c 192.168.12.2 -b 50000K -i 1 -t 3600 -S 0xB8

DSCP AF11
iperf -c 192.168.12.2 -b 50000K -i 1 -t 3600 -S 0x28

DSCP AF21
iperf -c 192.168.12.2 -b 50000K -i 1 -t 3600 -S 0x48

DSCP AF31
iperf -c 192.168.12.2 -b 50000K -i 1 -t 3600 -S 0x68

These are four streams of 50 Mbit, more than the interface can handle.

Here’s the interface configuration:

SW1-LAB#show run interface gi1/0/48
Building configuration...

Current configuration : 102 bytes
!
interface GigabitEthernet1/0/48
 switchport mode trunk
 speed 100
 service-policy output TRUNK
end

With this policy-map:

SW1-LAB#show policy-map interface gi1/0/48
 GigabitEthernet1/0/48 

  Service-policy output: TRUNK

    queue stats for all priority classes:
      Queueing
      priority level 1
      
      (total drops) 104742
      (bytes output) 2487565108

    Class-map: EF (match-any)  
      1618739 packets
      Match:  dscp ef (46)
        0 packets, 0 bytes
        5 minute rate 0 bps
      Priority: Strict, 
      
      Priority Level: 1 
      police:
          rate 20 %
          rate 20000000 bps, burst 625000 bytes
        conformed 2040394416 bytes; actions:
          transmit 
        exceeded 441311510 bytes; actions:
          drop 
        conformed 18742000 bps, exceeded 4021000 bps

    Class-map: AF11 (match-any)  
      1122765 packets
      Match:  dscp af11 (10)
        0 packets, 0 bytes
        5 minute rate 0 bps
      Queueing
      
      (total drops) 7193802
      (bytes output) 1725566766
      bandwidth 10% (10000 kbps)

    Class-map: AF21 (match-any)  
      1759571 packets
      Match:  dscp af21 (18)
        0 packets, 0 bytes
        5 minute rate 0 bps
      Queueing
      
      (total drops) 10600194
      (bytes output) 2704096890
      bandwidth 20% (20000 kbps)

    Class-map: AF31 (match-any)  
      2349422 packets
      Match:  dscp af31 (26)
        0 packets, 0 bytes
        5 minute rate 0 bps
      Queueing
      
      (total drops) 13701468
      (bytes output) 3610726698
      bandwidth 30% (30000 kbps)

    Class-map: class-default (match-any)  
      148 packets
      Match: any 
      
      
      (total drops) 0
      (bytes output) 1472

When this policy-map is applied, it looks as expected:

  • EF: 21.0 Mbits/sec
  • AF11: 15.7 Mbits/sec
  • AF21: 25.2 Mbits/sec
  • AF31: 34.6 Mbits/sec

The queues for AF11, AF21, and AF31 get slightly more than what I configured. The bandwidth percent command is an absolute percentage of the total bandwidth (100 Mbit). The priority queue is policed to 20 Mbit so my three remaining queues have more available than what I configured for them. There is also the class-default class.

If I would generate some packets that don’t match any of my queues, they’ll end up in class-default and my non-priority queues would be limited to what I set with the bandwidth percent command.

If you use bandwidth remaining percent then you set the minimum bandwidth as a relative percentage of the remaining bandwidth. What that means, is the bandwidth available after the priority queue (and RSVP reservations).

For example:

SW1-LAB#show policy-map TRUNK2
  Policy Map TRUNK2
    Class EF
      priority level 1
     police rate percent 20
       conform-action transmit 
       exceed-action drop 
    Class AF11
      bandwidth remaining 10 (%)
    Class AF21
      bandwidth remaining 20 (%)
    Class AF31
      bandwidth remaining 30 (%)

Apply it:

SW1-LAB(config)#int gi1/0/48
SW1-LAB(config-if)#no service-policy output TRUNK 
SW1-LAB(config-if)#service-policy output TRUNK2

This is what I get:

  • EF: 21.0 Mbits/sec
  • AF11: 13.6 Mbits/sec
  • AF21: 25.2 Mbits/sec
  • AF31: 37.6 Mbits/sec

The priority queue has 20 Mbps. The other queues get a minimum bandwidth of 10%, 20%, and 30% of the remaining bandwidth (80 Mbit).

10% of 80 = 8 Mbps
20% of 80 = 16 Mbps
30% of 80 = 24 Mbps

I could generate some iperf traffic that hits the class default class:

iperf -c 192.168.12.2 -b 50000K -i 1 -t 3600

Once I do that, my traffic looks like this:

  • EF: 21.0 Mbits/sec
  • AF11: 8.39 Mbits/sec
  • AF21: 14.7 Mbits/sec
  • AF31: 22.0 Mbits/sec

That’s looking good. It matches what we configured.

In my examples, the interface is set to 100 Mbit and it has an actual bandwidth of 100 Mbit. That’s when everything works as it should.

If you have sitting something in between that reduces your bandwidth, then you should add a parent shaper to artificially set the correct bandwidth. Under the parent shaper, you add the policy-map with the queues. That’s what you did in your example.

SW1-LAB(config)#policy-map PARENT
SW1-LAB(config-pmap)#class class-default
SW1-LAB(config-pmap-c)#shape average percent 40
SW1-LAB(config-pmap-c)#service-policy TRUNK2
SW1-LAB(config)#interface gi1/0/48
SW1-LAB(config-if)#no service-policy out TRUNK2
SW1-LAB(config-if)#service-policy out PARENT

Here’s the output:

SW1-LAB#show policy-map interface gigabitEthernet 1/0/48
 GigabitEthernet1/0/48 

  Service-policy output: PARENT

    Class-map: class-default (match-any)  
      162998 packets
      Match: any 
      Queueing
      
      (total drops) 53371362
      (bytes output) 18905603164
      shape (average) cir 40000000, bc 400000, be 400000
      target shape rate 40000000

      Service-policy : TRUNK2

        queue stats for all priority classes:
          Queueing
          priority level 1
          
          (total drops) 13662
          (bytes output) 4109919128

        Class-map: EF (match-any)  
          0 packets
          Match:  dscp ef (46)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Priority: Strict, 
          
          Priority Level: 1 
          police:
              rate 20 %
              rate 8000000 bps, burst 250000 bytes
            conformed 0 bytes; actions:
              transmit 
            exceeded 0 bytes; actions:
              drop 
            conformed 0000 bps, exceeded 0000 bps

        Class-map: AF11 (match-any)  
          0 packets
          Match:  dscp af11 (10)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Queueing
          
          (total drops) 8174430
          (bytes output) 2105640240
          bandwidth remaining 10%

        Class-map: AF21 (match-any)  
          0 packets
          Match:  dscp af21 (18)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Queueing
          
          (total drops) 15400110
          (bytes output) 4001389786
          bandwidth remaining 20%

        Class-map: AF31 (match-any)  
          70235 packets
          Match:  dscp af31 (26)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Queueing
          
          (total drops) 23809830
          (bytes output) 6842339460
          bandwidth remaining 30%

        Class-map: class-default (match-any)  
          92763 packets
          Match: any 
          
          
          (total drops) 5973330
          (bytes output) 1846317586

We shape our traffic to 40 Mbit. The priority queue gets 20% of 40 = 8 Mbit.

The other queues receive 10, 20, and 30% of the remaining bandwidth (80% of 40 Mbit = 32 Mbit) so that’s a minimum bandwidth of 3,2 Mbit, 6,4 Mbit, and 9,6 Mbit.

With iperf still running (including the class-default traffic), this is what I see:

  • EF: 7.34 Mbits/sec
  • AF11: 3.15 Mbits/sec
  • AF21: 6.29 Mbits/sec
  • AF31: 9.44 Mbits/sec
  • Class default: 12.6 Mbits/sec

So that’s looking good too. Exactly what we configured. In a nutshell, your config looks good. What software did you use to generate traffic?

Rene

@ReneMolenaar We are using Viavi Bryd testers to generate 4 streams of traffic, a really amazing device. The HQoS configuration I created turned out to be exactly what we were hoping for. Thanks for the quick reply.

I have a question for you. If i have devices in a vlan, lets say vlan300 and I want to mark that traffic. I can create a class-map called:

class-map Access_VLAN300
match vlan 300
Policy-map Inbound_VLAN300
class Access_VLAN300
Set cos 6
int gig1/0/13
service-policy  in Inbound_VLAN300

The configuration above I assume will mark all traffic from vlan 300 to cos 6?

@vicko164 That config is valid yes but I think it only matches on the VLAN tag itself. You’d have to check that.

If so, it only works on interfaces where you have a VLAN tag. A trunk or an sub-interface with a VLAN tag.

Rene