Forum Discussion

Luis_Carlos_101's avatar
Luis_Carlos_101
Icon for Nimbostratus rankNimbostratus
Jun 03, 2011

iRule with Rate Shaping

Hi guys,

 

 

I'm new and I need the DevCentral iRule to implement a rate shaping for a specific group of ip's.

 

Can someone help me.

 

 

 

 

Thanks

 

 

  • Hi Luis,

     

     

    You can add the addresses/ranges you want to act on to an address type datagroup and then use an iRule which uses the class command (v10) or the matchclass command (v9) to check the client IP against the datagroup. You can assign a rate class using the rateclass command:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/rateclass

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/class

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/matchclass

     

     

    Aaron
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Also, you'll likely want to do this on a per connection basis, so I'd recommend looking into the CLIENT_ACCEPTED event as a starting place.

     

     

    Colin
  • Hi,

     

     

    If I wanted to do rate shaping on http protocol and I wanted to update the rate class to be used at the fly depending on some conditions specified in a conditional “if” I'm tempted to believe that this can be done by:

     

     

    1) Specifying an initial Rate Class in the CLIENT_ACCEPTED event

     

     

    2) Have in the HTTP_REQUEST event a "conditional if" setting rate class to a value if a condition happens or setting it to a different value if a different condition happens.

     

     

    Is my assessment correct that one could dynamically change the rate class to be used in an http connection at the fly by implementing what I described above?

     

     

    Please advice

     

    Thanks