cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
706
Views
0
Helpful
3
Replies

QoS bandwidth percentage

Junnan Wu
Level 1
Level 1

Hello,

 

I know QoS bandwidth command garantees minimum bandwidth for traffic of certain class. what is the baseline line when using "bandwidth percentage"? Is it based on physical interface ?  let's say, I have a gigabit WAN interface

 

class-map data-1

     match access-group data1

policy-map test

    class data-1

    bandwidth percentage 10

interface G0/0/1

   service-policy output test

 

in this way, I have 100M BW reserved at least for this class when congested.

 

what if I put a cap on the link, see below. because I may not have that much bandwidth.

 

policy-map shape30M

class class-default

  shape average 30000000

  service-policy test

 

interface G0/0/1

   service-policy output shape30M

 

In this case, can bandwidth command be aware of total 30m bandwidth and reserve 3M(10%)  ?       

3 Replies 3

e.ciollaro
Level 4
Level 4

Yes, I tested on GNS:

I created two policy and applied them:

 

R1# sh  policy-map
  Policy Map shaping
    Class class-default
      Traffic Shaping
         Average Rate Traffic Shaping
         CIR 500000 (bps) Max. Buffers Limit 1000 (Packets)
      service-policy out


  Policy Map out
    Class ICMP
      Bandwidth 25 (%) Max Threshold 64 (packets)

 

R1#sh policy-map interf f0/0
 FastEthernet0/0

  Service-policy output: shaping

    Class-map: class-default (match-any)
      57 packets, 4480 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
      Traffic Shaping
           Target/Average   Byte   Sustain   Excess    Interval  Increment
             Rate           Limit  bits/int  bits/int  (ms)      (bytes)
           500000/500000    3000   12000     12000     24        1500

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping
        Active Depth                         Delayed   Delayed   Active
        -      0         57        4480      0         0         no

      Service-policy : out

        Class-map: ICMP (match-all)
          0 packets, 0 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: protocol icmp
          Queueing
            Output Queue: Conversation 41
            Bandwidth 25 (%)
            Bandwidth 125 (kbps)Max Threshold 64 (packets)
            (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0

        Class-map: class-default (match-any)
          57 packets, 4480 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: any

 

As you can see the "child" policy has 125Kbps that is 25% of 500.000bps

 

Bye

enrico

 

PS rate if useful

Thanks Enrico & Joseph for the explaination. 

 

I did a test using GNS3, It seems "bandwidth percentage" has the intelligence to detect and choose the smaller value when both bandwidth command and global shaping are present.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Percentage is based on what the CBWFQ policy believes the controlling bandwidth is. (The newer implementations should show what bandwidth the percentage "uses". [As shown in Enrico's post.])

If CBWFQ class bandwidth is applied at the main level of a physical interface, it should be based on what it believes the physical interface bandwidth is. (I.e. either actual physical or what the bandwidth statements sets it to.)

If there's a parent policy shaper, it will use the shaper's bandwidth (again as shown in Enrico's post).

BTW, the bandwidth statement doesn't actually reserve bandwidth, as other classes can use it if it's otherwise unused and second the bandwidth minimum is only accurate if all 100% has been allocated and all classes are trying to use more than their minimum guarantee.

For example:

class A
bandwidth percent 20
class B
bandwidth percent 60

As above doesn't allocate all 100%, if both class A and class B desired all bandwidth, they would get in 1:3 or class A would get 25% while class B would get 75%.

Or, for example:

class A
bandwidth percent 20
class B
bandwidth percent 60
class C
bandwidth percent 20

If again, classes A and B desired all bandwidth, and there was no class C traffic, they would still split the bandwidth 1:3. If class C also wanted all bandwidth, than the percentages would match what the classes would obtain.

Review Cisco Networking for a $25 gift card