Forum Discussion

Steve_Mercieca_'s avatar
Steve_Mercieca_
Icon for Nimbostratus rankNimbostratus
Jan 26, 2017

iRule to apply Dynamic Bandwidth Controller Policy depending on Client subnet

Hi all,

 

We have a requirement to apply different Dynamic Bandwidth Controller Polcies depending on the client subnet. This needs to operate on both traffic from client and from server. I have an example which works for all Clients, but need to assign different limits based on client subnet.

 

 

when CLIENT_ACCEPTED {
    set mycookie [IP::remote_addr]:[TCP::remote_port]
    BWC::policy attach dynamic_BC $mycookie
}

when SERVER_CONNECTED {
    set mycookie [IP::remote_addr]:[TCP::remote_port]
    BWC::policy attach dynamic_BC $mycookie
}

 

An example of what I wish to achieve:

 

Client address is in 10.200.0.0/22 then 1MBit maximum upload/download enforced. Client address is in 10.204.0.0/22 then 10MBit maximum upload/download enforced.

 

Thanks in advance!

 

Steve