Forum Discussion
littlebunny
Nimbostratus
Mar 02, 2019iRule for bandwidth throttling per client IP
Hello
We would like to create an iRule that limits the bandwidth from each client IP address to a specific Virtual Server to 10mbps. I've seen some other similar articles but I'm not familiar wi...
Mar 03, 2019
Are you sure you'll need an iRule? If the same bandwidth limits apply to all clients going to a specific Virtual Server, you could configure one rate class profile and add this to the virtual server.
If you want to define groups and multiple rate class profiles, you could use this iRule below (found here: https://devcentral.f5.com/questions/iRules-for-rate-shaping).
Paying users get the bandwidth
User's IPs defined in the iRules/DataGroups
when CLIENT_ACCEPTED {
if { [[IP::client_addr] eq matchclass gold_users] } {
rateclass rateshape_10mb
}
elseif { [[IP::client_addr] eq matchclass silver_users] } {
rateclass rateshape_512k
}
elseif { [[IP::client_addr] eq matchclass lump_o_coal_users] } {
rateclass rateshape_128k
}
else {
discard
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects