Forum Discussion

RiverFish's avatar
RiverFish
Icon for Altostratus rankAltostratus
Oct 03, 2013

GTM iRule that chooses pool based on uri port?

Can you create a GTM iRule that looks for a specific port in the DNS request? Is the GTM even aware of ports? It wont let me create this iRule:

 

when DNS_REQUEST { if { [URI::port] eq "62007" } { pool abcabc } }

 

3 Replies

  • GTM only is aware of DNS requests which don't contain ports.

     

    Unless you also enable LTM module and get the HTTP requests on same device...

     

  • Unless you also enable LTM module and get the HTTP requests on same device...

     

    GTM is really only aware of IP addresses and host names. Also consider that the DNS request to GTM will always be port 53. Only the resulting LTM VIP will see the other port. You could, technically:

     

    1. Send users to a "default" host via GTM resolution.
    2. When they arrive at this LTM VIP, evaluate the port and then redirect them to a new host name (which the GTM might resolve to something else).