Forum Discussion

Ricardo_Raza_14's avatar
Icon for Nimbostratus rankNimbostratus
Jul 13, 2018

irule to select pool in time and bwc

Hi I need to do an irule to select specific pool to load balancing to have internet, and irule to do a bandwidth controller; I try to join 2 irules in one and do the next irule. But the client loss internet connection.

My scenario is I have 2 service providers and do load balancing to navigate in internet, but the other thing that they want to do is doing a bandwidth control management, but when I do that not work.

Please your help.


Get the current time in seconds since the Unix epoch of 0-0-1970

set now [clock seconds] set start [clock scan "5:00 pm"] set end [clock scan "11:59:59 pm"] set start1 [clock scan "12:00 am"] set end1 [clock scan "2:00:00 am"] set mycookie [IP::remote_addr]:[TCP::remote_port]

Check if the current time is between the start and end times

if {$now > $start and $now < $end} { pool pool_navegacion

BWC::policy attach  bwc_nocturno $mycookie

log local0. " pool navegacion" log local0. " bwc rule" }

if {$now > $start1 and $now < $end1} { pool pool_navegacion log local0. " pool navegacion segundo if" }

1 Reply

  • please spend some time on formatting that irule so we can read it.


    also please add the logging from /var/log/ltm when you try to access the virtual server