Forum Discussion

Cory_50405's avatar
Cory_50405
Icon for Noctilucent rankNoctilucent
Jun 27, 2013

iRule for recursive DNS redirect

Background:

 

I modified the root hints on my GTM (http://support.f5.com/kb/en-us/solu...l8380.html) to specify two different root servers instead of the 13 root servers at root-servers.net. I realize this may seem odd, but our recursive queries need to be sent to these two servers for reasons unnamed.

 

I'm looking into building an iRule that does the following:

 

1. Checks the status of active members in a pool (this I know how to do), and that pool would contain both aforementioned root servers

 

2. If the status of the pool is up, then do nothing out of the ordinary. Simply direct recursive queries to those two root servers (this will happen on its own).

 

3. If the status of that pool is down, then direct recursive queries somewhere else, for example a.root-servers.net (I have not found a way to do this)

 

 

Has anyone done something like this, or know of a better way to accomplish what I am trying to do?

 

- Cory

 

3 Replies

  • I didn't check back in after I posted this, but the project went a slightly different direction. I figured this out after some guess and check, and some good help from our F5 SE.
  • I realize you got your answer, but for the benefit of others searching, I'd approach this with two pools. One for the the specific two servers, and the other for the remaining root servers. Then use an iRule like this:

    when CLIENT_ACCEPTED {
      if { !([active_members primary_pool] >= 1) } {
        pool secondary_pool
      }
    }