Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

GTM and SRV Records

Hello

We have been asked by our customer to provide DNS resolution based on geography, e.g. US clients get given a US server IP, European clients a European server IP etc. Topology records are clearly a good fit here in terms of technology. There is one thing, however, which I'm a little stumped by, simply because I've never worked with them. They are SRV records.

From what I've have read about SRV records & what I know about the GTM it looks like we cannot use Topology records in the same way as standard A records.

I know this question might at first sound a little vague but would appreciate a steer on this one from the community. What things I need to consider? Can this even work? Any other questions to ask them to try get to a resolution everyone can be happy with.

Thank you.

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Don’t mean to bump this up but also wondered - is it possible an SRV record could have a target/resource that is itself a Wide IP and therefore we could utilise Topology load balancing?

For example:

_sip._tcp.wideipname

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi Devious,

a SRV records is basically an extended CNAME record with additonal a Weigth/Priority/Port values for the resolved HOST-Name(s).

when DNS_REQUEST { 

    # Searching for DNS request for SRV = _sip._tcp.domain.de

    if { ( [string tolower [DNS::question name]] equals "_sip._tcp.domain.de"  ) 
     and ( [DNS::question type] equals "SRV" ) } then {

            # Defining DNS answer for the requested SRV record (Question Name = _sip._tcp.domain.de., ttl = 600, class = IN, type = SRV, priority = 100, weight = 100, port = 5060, hostname = sip.domain.de ) 

            DNS::answer insert "_sip._tcp.domain.de. 600 IN SRV 10 100 5060 sip1.domain.de"
            DNS::answer insert "_sip._tcp.domain.de. 600 IN SRV 20 100 5060 sip2.domain.de"

            # Changing "Authorative Answer" DNS header to true.

            DNS::header aa 1 

            # Sending the DNS response

            DNS::return

        }
    }
}

After your DNS client gets the SRV response, it will perform an additional A or AAAA query for the just received HOST names. The subsequent A or AAAA request may then target a wide-IP as usuall...

Note: The SRV response may already include the A or AAAA DNS responses for the just resolved HOST names to speed up DNS resolution. To make those additional A or AAAA DNS answers GLBS aware you would need a handcrafted logic to perform the country checks and flip the IP based on those information. Its not rocket science, but still far more complicated than using two independent DNS queries/responses...:-)

Cheers, Kai

0
Comments on this Answer
Comment made 3 weeks ago by devious 2

Thank you Kai

I noticed you tend to give good answers.

So I have attempted to set something up in my lab but haven't quite got there. I have a Windows DNS server which has delegated the 'wip.lab.com' sub-domain to the GTM. On the GTM I have configured a set of pools and bound them to a Wide IP. All set as a standard 'A' type with Topology as the LB method. I then configured a Topology record which goes "if src subnet is the MS DNS server, then return pool 1". I then observed on the wire the following:

  1. Client queries MS DNS (its configured DNS) for the SRV record which for the sake of testing is:

_test._tcp.test.wip.lab.com on port 80

  1. MS DNS then performs a standard A query to the GTM for test.wip.lab.com
  2. The GTM returns both pool member IP addresses, not pool member #1 which I had hoped.

So a bit frustrated with this & keen not to go down the route of iRules.

Any idea where I might be going wrong?

0
Comment made 3 weeks ago by Kai Wilke 6860

Hi Devious,

you have to make sure, the SRV record points to a single HOSTNAME and the A record of the HOSTNAME is matching a wide IP.

With your current setup could you please provide a detailed DNS conversation output using the following commands...

c:\nslookup - dc.yourdomain.tld
> set d2
> set type=a
> [Target_HOSTNAME_Value_of_the_SRV_Record].wip.lab.com.

... and ...

c:\nslookup - dc.yourdomain.tld
> set d2
> set type=srv
> _test._tcp.test.wip.lab.com.

Note: Mask IPs and domain names as needed, but please keep everything else intact.

Cheeers, Kai

0