Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shaper not working 1

Status
Not open for further replies.

jjk3

MIS
Nov 18, 2002
31
US
I’ve implemented a shaper to limit traffic to 1Mbps, but it doesn’t seem to be working. Below I can see that 1368000 and later 2912000 bps of traffic is going through the interface but the shaper is not activating.

The config is at the bottom, Can anyone see if I am doing anything wrong?

Code:
Router1#show policy-map interface fa0/1
 FastEthernet0/1

  Service-policy output: Outbound-Test

    Class-map: class-default (match-any)
      17392 packets, 10594590 bytes
      30 second offered rate 1368000 bps, drop rate 0 bps
      Match: any
      Traffic Shaping
           Target/Average   Byte   Sustain   Excess    Interval  Increment
             Rate           Limit  bits/int  bits/int  (ms)      (bytes)
          1000000/1000000   2500   10000     10000     10        1250

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping
        Active Depth                         Delayed   Delayed   Active
        -      0         72        9070      0         0         no

Router1#show policy-map interface fa0/1
 FastEthernet0/1

  Service-policy output: Outbound-Test

    Class-map: class-default (match-any)
      56132 packets, 38481782 bytes
      30 second offered rate 2912000 bps, drop rate 0 bps
      Match: any
      Traffic Shaping
           Target/Average   Byte   Sustain   Excess    Interval  Increment
             Rate           Limit  bits/int  bits/int  (ms)      (bytes)
          1000000/1000000   2500   10000     10000     10        1250

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping
        Active Depth                         Delayed   Delayed   Active
        -      0         109       14642     0         0         no

Here is the config:

Code:
policy-map Outbound-Test
 class class-default
  shape average 1000000 10000

interface FastEthernet0/1
 bandwidth 2000
 ip address X.X.X.X 255.255.255.252
 ip access-group internet-in in
 ip access-group internet-out out
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip accounting precedence input
 ip accounting precedence output
 ip flow ingress
 ip route-cache flow
 load-interval 30
 tx-ring-limit 2
 tx-queue-limit 2
 duplex auto
 speed auto
 no cdp enable
 max-reserved-bandwidth 100
 service-policy output Outbound-Test

Thanks,

Joe


---------------------------------------
Joe Keegan - Joe@jjk3.com
SANS GSEC & GCFW
CCSE, CCNA, CCSA & Sun Certified
 
It looks correct to me. What is the default tx ring size on a fast ethernet? Remember your shaper wont engage unless the interface is congested.
 
Hello
Are you shaping on the WAN on LAN interface?

Regards
 
I'm not sure what the default tx ring, but I believe I am configuring it to 2 with the the following commands.

Code:
tx-ring-limit 2
tx-queue-limit 2

As for the type of interface, I'm not sure what you are getting after, but it's a Fast Ethernet port hooked up to a satellite modem.

---------------------------------------
Joe Keegan - Joe@jjk3.com
SANS GSEC & GCFW
CCSE, CCNA, CCSA & Sun Certified
 
What model device are you trying this on? I'm not certain that a fastethernet interface can do shaping even on a router. But also have never tried it.
 
Hello
Sorry about the last post,I meant to ask if the policy was applied on the interface facing the Internet or your Inside local network.In any case for troubleshooting reason try putting the policy on the inside interface.
Do you have public servers on your LAN or most of the traffic is from you PC downloading from the Internet.
Regards
 
The reason why you are allowed to exceed the rate at which you want to is because you have allowed for excess burst on your circuit. By only entering shape average 1000000, cisco has default settings that calculate the sustained and excess burst for you. But as with most commands, you can modify this to accomplish what you are trying to do. Try the following command sequence and it should get you the result that you are looking for.

shape average 1000000 10000 0

One caveat. If your CIR from your provider was 1000000, and they were being strict, meaning not allowing you to burst, then you might have been dropping packets in the cloud and not knowing this. As such, when you make the change, you may start to see packets being dropped by the policy and may have to make adjustments in queue depths for your traffic classes.
 
Thanks for the reply Maheick, but it turns out the issue was resolved by changing the version of IOS, either to a newer or older version, I don't remember.

As you can see the offer rate is 2912000 bps in the second "show policy-map interface fa0/1" that I included. This is nearly 3 times the CIR.

While it's true the shaper does allow some bursting, it defaults at something like 25%, not 300%.


---------------------------------------
Joe Keegan - Joe@jjk3.com
SANS GSEC & GCFW
CCSE, CCNA, CCSA & Sun Certified
 
It's actually barely over twice...but still...lol

So you don't remember what version was on before? I have a 2620XM that I am planning to run some tests on, as well as a 3640..can you post a sh ver? Thanks.

/
 
Beleive it or not, the default is acutally to allow for the burst to be 2x CIR. The occurs because the traffic will be able to burst Bc + Be every 10 ms.

Using your output as an example:

Bc = 10,000 bits/interval
Be = 10,000 bits/interval
Interval(Tc) = 10 ms
Replishment Rate = 1250 bytes/10 ms = 10,000 bits/10 ms
Max Send rate = 2500 bytes/interval = 20,000 bits/10 ms
There are 100 10ms intervals in 1 second.

So for a sustained push, your throughput would look something like this
T=0 Bc + Be = 20,000 bits
T=1 Bc = 10,000 (No Be available - Bucket needs to be replinished.)
T=2 Bc + Be = 20,000
.....

So in 1 full second,

50 (20,000)= 1,000,000
50 (10,000)= 500,000

If there was a sustained push, and the bandwidth was available, with no packet loss anywhere along the path, you theoretically could see a max throughput of 1,500,000.

It seems as though you have grasped the concepts, but given some of the responses to this thread, I thought this might be helpful to others. By I will second the request if you could somehow determine what code you were working with.

Thanks.
Mark
 
Mark thank you for this info, it turns out I did miss some concepts, specially the details of the PIR. I reread the section on shapers in the "End-to-End QoS Network Design" book and along with your example it makes much more sense. Thanks!

That being said, an offer rate of 2912kbps for a 1000kbps shaper was still too high, even with the defaults. Cisco TAC agreed that it wasn't working as expected, although I concede they are not always right.

As for the IOS I went from version 12.4(3i) to version 12.4(13r)T.

After the upgrade the shaper acted as expected.

---------------------------------------
Joe Keegan - Joe@jjk3.com
SANS GSEC & GCFW
CCSE, CCNA, CCSA & Sun Certified
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top