Why the actual ip is not returned in a dns srv lookup?

131 views
Skip to first unread message

Y Lee

unread,
Nov 9, 2016, 6:42:29 AM11/9/16
to Consul
Instead another hostname is returned. The ip is returned in the additional section, which is not recognizable by most dns resolver library.
Is there anyway to get the ip and host in the a srv lookup?

Michael Fischer

unread,
Nov 9, 2016, 7:00:45 AM11/9/16
to consu...@googlegroups.com
That's the format of a DNS SRV record; see RFC 2782 (https://www.ietf.org/rfc/rfc2782.txt).  Specifically:

   Here is the format of the SRV RR, whose DNS type code is 33:

        _Service._Proto.Name TTL Class SRV Priority Weight Port Target
   Target
        The domain name of the target host.  There MUST be one or more
        address records for this name, the name MUST NOT be an alias (in
        the sense of RFC 1034 or RFC 2181).  Implementors are urged, but
        not required, to return the address record(s) in the Additional
        Data section.  Unless and until permitted by future standards
        action, name compression is not to be used for this field.
If your client wants the IP address of the returned names, it'll have to perform DNS A record queries for them to obtain them.

On Wed, Nov 9, 2016 at 3:42 AM, Y Lee <yle...@gmail.com> wrote:
Instead another hostname is returned. The ip is returned in the additional section, which is not recognizable by most dns resolver library.
Is there anyway to get the ip and host in the a srv lookup?

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/14edce2c-93ea-493a-aff8-99d6e6b85363%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages