Forum Discussion

Sergi0's avatar
Sergi0
Icon for Nimbostratus rankNimbostratus
Oct 31, 2017

GTM and static resolve ip

Can we use GTM for resolve ip without health monitor? I am interested in create wip with rules if request for company.com from 10.10.10.0/24 resolve 10.1.1.1 if request from 10.20.20.0/24 resolve 10.2.2.2 10.1.1.1 and 10.2.2.2 are not reachable from GTM. I created servers 10.1.1.1 and 10.2.2.2 but can not create pool with servers because servers are not in virtual server list.

 

2 Replies

  • I think you can do this without pool members at all. Simply use a GSLB iRule on the company.com wide IP to do the resolution statically. For example, something like this:

    when DNS_REQUEST {
       if { [DNS::question name] ends_with ".company.com" } {
          if { [IP::addr [IP::client_addr] equals 10.10.10.0/24] } {
             host 10.1.1.1
          } elseif { [IP::addr [IP::client_addr] equals 10.20.20.0/24] } {
             host 10.2.2.2
          }
       }
    }
    `
    
    
    Adjust the comparison operator after the "ends_with" depending on your wide IP configuration. The only outstanding question is what you want to do if the query is for company.com but not from either of the two networks. You could always add an else condition that returned a REFUSED response. For example:
    
    
    `} else {
       DNS::header rcode REFUSED
       DNS::return
    }
    
  • You may try the following:

     

    Create a GTM dummy server list (with no health monitor assigned) and under Virtual Server -> Virtual Server Discovery: disabled Add members manually.

     

    https://devcentral.f5.com/wiki/iRules.GTM.ashx pool - Causes the system to load balance traffic to the specified pool or pool member regardless of monitor status.