I'm trying to understand whether or not is it possible to use an IP address in a SRV record's "Target" section instead of an hostname.
I noticed that when querying an SRV record (using dig
or dnsjava
) on a DNS server I'm getting the resulted hostname following a trailing dot (absolute path) - this means that if I want to use an IP address I'll have to chop the dot, so I'll be able to connect to targeted IP.
Is this follows the SRV's specification (RFC 2782) ? And if I'm obligate to use a hostname, can you please explain why ?
I'm asking this for being able to implement the client side which fetch the result for a certain service after querying the relevant SRV record.