# Disabling GTM Persistence selectively

**URL:** <https://community.f5.com/t/disabling-gtm-persistence-selectively/61103>\
**Category:** Technical Forums\
**Tags:** irules, dev, devops, application-delivery\
**Created:** [June 1, 2007, 3:34pm UTC](https://community.f5.com/t/disabling-gtm-persistence-selectively/61103 "2007-06-01T15:34:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [June 1, 2007, 3:34pm UTC](https://community.f5.com/t/disabling-gtm-persistence-selectively/61103/1 "2007-06-01T15:34:55Z")

</div>

We have a few cases for an internal application where a great number of clients will be hitting GTM via delegation, which means that all users requesting from each delegation will be persisted accordingly. We want the persistence on each wideIP , but not for everyone. Is there an alternative to the persist command that will achieve this desired behavior? In the rule below, I am attempting to not persist if the requests are from a couple subnets, however, I get an error.

**01070151:3: Rule [nopersist] error:**

**line 4: [undefined procedure: persist] [persist none]**

```tcl
when DNS_REQUEST {
  if {[IP::addr [IP::client_addr] equals 10.1.1.0/24] or \
       [IP::addr [IP::client_addr] equals 10.2.1.0/24]}{
         persist none 
  }
}

```

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [June 1, 2007, 3:50pm UTC](https://community.f5.com/t/disabling-gtm-persistence-selectively/61103/2 "2007-06-01T15:50:10Z")

</div>

OK, I’ll give myself a big fat **RTFM** :

ttl Overrides the default time-to-live value. Overrides the default time-to-live value. If this command is used for a CNAME, the value overrides the default of 0. If this command is used for a pool, the value overrides the time-to-live value for that pool.

```tcl
when DNS_REQUEST {
  if { [IP::addr [IP::client_addr]/24 equals "10.1.1.0"] \
    or [IP::addr [IP::client_addr]/24 equals "10.2.1.0"] } {
      ttl 0
  }
}

```

At the wideIP level, I presume this means persistence, and at the pool level, I presume this means the actual TTL. How do I ensure this is applied at the wideIP level?

…unsolicitated commentary to follow…

Could something other than TTL have been selected as a nomenclature for persistence on the GTM?

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [June 1, 2007, 5:43pm UTC](https://community.f5.com/t/disabling-gtm-persistence-selectively/61103/3 "2007-06-01T17:43:13Z")

</div>

The rule as written in the previous post resets the defined dns ttl of 600 to 0, so this is not what I wanted. Any ideas?

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [June 8, 2007, 7:44pm UTC](https://community.f5.com/t/disabling-gtm-persistence-selectively/61103/4 "2007-06-08T19:44:04Z")

</div>

I have opened case C358989 with support on this problem, tech.out is attached to the case. Thanks.

---

<div class="post-metadata">

**Author:** ![Haarith\_Devaraj](https://avatars.discourse-cdn.com/v4/letter/h/0ea827/32.png) [@Haarith\_Devaraj](https://community.f5.com/u/Haarith_Devaraj)\
**Post date:** [March 19, 2009, 10:45pm UTC](https://community.f5.com/t/disabling-gtm-persistence-selectively/61103/5 "2009-03-19T22:45:09Z")

</div>

Hi Elah,

We are dealing with some crawlers which we didnt want to redirect with a CNAME. Persist none would be ideal. Was curios if you got a resolution on that case. ( we are version 9.4.6 ).

Also is it possible to do a class lookup rather than a nested if.

Thanks,

Haarith

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [May 13, 2009, 5:59pm UTC](https://community.f5.com/t/disabling-gtm-persistence-selectively/61103/6 "2009-05-13T17:59:34Z")

</div>

In version 10, there is now a **persist disable** command that should eliminate the CNAME requirement for this solution.
