Forum Discussion

AhmedSaied_2402's avatar
AhmedSaied_2402
Icon for Altostratus rankAltostratus
Jan 20, 2019

BIG IP DNS MX

Hello,

 

In intelligent DNS resolution we can use wide IPs and iRules

 

example to resolve type A when can use wide IP type A and iRule as below

 

when DNS_request { host 10.10.10.10 }

 

but how can do the same for wide IP with MX type what will be its iRule ?!

 

1 Reply

  • Hi Ahmed,

    a DNS response to an MX query contain just a FQDN value, so you don't need to care about wide IPs.

    Check the iRule sample below to get an overview how MX DNS responses can be crafted...

    when DNS_REQUEST {
    
        if { ( [string tolower [DNS::question type]] eq "mx")
         and ( [string tolower [DNS::question name]] eq "domain.de" ) } then {
    
             Defining DNS answers for the requested MX records (Question Name = Domain Name, ttl = 600, class = IN, type = MX, data = priority FQDN) 
    
            DNS::answer insert [DNS::rr "domain.de 600 IN MX 100 mx1.domain.de"] 
            DNS::answer insert [DNS::rr "domain.de 600 IN MX  50 mx2.domain.de"] 
    
             Changing "Authorative Answer" DNS header to true.
    
            DNS::header aa 1 
    
             Sending the DNS response
    
            DNS::return 
        }
    
    }
    

    Note: After the DNS response has been received by the MTA, it will perform an additional A and/or AAAA record lookups for the received FQDNs. This is where the wide IP comes into play...

    Cheers, Kai