Forum Discussion

Abed_AL-R's avatar
Abed_AL-R
Icon for Cirrostratus rankCirrostratus
Dec 11, 2018

GTM - iRule - Source IP persistence for only one network

Hi

 

I want to impelemt in GTM a persistence for a specific wide IP. That persistence should persist based on source IP address . But there is a network (192.168.0.0 255.255.0.0) that I need it to be persist for /16 . And this should be only for this network . Anything else should persist based on /32 subnet . Does GTM support this , if not , then can I do that in irule .

 

  • TECHNICAL ARTICLE Selective DNS Persistence on GTM

     

    search this article, it gives great irule.

     

    rule "SelectivePersist-rule" { when DNS_REQUEST { if { [IP::addr [IP::client_addr]/16 equals "10.1.0.0"] \ or [IP::addr [IP::client_addr]/16 equals "10.2.0.0"] } { cname "myService-noPersist.gtm.test.com" } } }

     

    wideip { name "myService.gtm.test.com" persist yes persist_ttl 1800 pool_lbmode rr pool "myPool" rule "SelectivePersist-rule" }

     

    wideip { name "myService-noPersist.gtm.test.com" pool_lbmode rr pool "myPool" }