<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 23/07/14 15:50, Mark Heslin wrote:<br>
    </div>
    <blockquote cite="mid:53CFBDAC.4080503@redhat.com" type="cite">Martin,
      Petr,
      <br>
      <br>
      Thanks for helping me sort through the syntax. I have the entries
      added properly:
      <br>
      <br>
        # ipa dnsrecord-show example.com _foo.tcp
      <br>
          Record name: _foo.tcp
      <br>
          SRV record: 0 0 53 foo1.example.com., 0 0 53 foo2.example.com.
      <br>
      <br>
        # host -t srv _foo.tcp
      <br>
        _foo.tcp.example.com has SRV record 0 0 53 foo2.example.com.
      <br>
        _foo.tcp.example.com has SRV record 0 0 53 foo1.example.com.
      <br>
      <br>
      but how to I actually use the entry?
      <br>
      <br>
       # nslookup _foo.tcp
      <br>
       Server:        10.19.140.101
      <br>
       Address:    10.19.140.101#53
      <br>
      <br>
       *** Can't find _foo.tcp: No answer
      <br>
      <br>
      # nslookup _foo.tcp.example.com.
      <br>
      Server:        10.19.140.101
      <br>
      Address:    10.19.140.101#53
      <br>
      <br>
      *** Can't find _foo.tcp.example.com.: No answer
      <br>
      <br>
      # ping _foo.tcp
      <br>
      ping: unknown host _foo.tcp
      <br>
    </blockquote>
    <br>
    Hi,<br>
    <br>
    try to use dig,<br>
    <meta name="qrichtext" content="1">
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;
      -qt-user-state:0;"><!--StartFragment--><a class="moz-txt-link-freetext" href="https://library.linode.com/linux-tools/common-commands/dig">https://library.linode.com/linux-tools/common-commands/dig</a><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;
      -qt-user-state:0;"><br>
      dig srv _foo.tcp.example.com.<br>
      <!--EndFragment--></p>
    <meta http-equiv="Content-Type" content="text/html;
      charset=ISO-8859-1">
    <style type="text/css">
p, li { white-space: pre-wrap; }
</style><br>
    <br>
    <blockquote cite="mid:53CFBDAC.4080503@redhat.com" type="cite">
      <br>
      The point of this is to create a front-end to balance requests
      from OpenShift clients
      <br>
      across a set of OpenShift brokers. Host "foo" would alternate
      across the first broker
      <br>
      (foo1) and second broker (foo2).
      <br>
      <br>
      -m
      <br>
      <br>
      <br>
      <br>
      <br>
      On 07/22/2014 08:06 AM, Mark Heslin wrote:
      <br>
      <blockquote type="cite">On 07/22/2014 08:00 AM, Mark Heslin wrote:
        <br>
        <blockquote type="cite">Martin, Petr,
          <br>
          <br>
          I didn't see that missing dot "." - good catch. As always the
          devil is in the details :-)
          <br>
          <br>
          Two follow up questions:
          <br>
          <br>
           1. I've set the priority and weighting equally here but I
          will add a third host
          <br>
                so would it make sense to just set both priority and
          weight to "0" for all three hosts?:
          <br>
          <br>
                 # ipa dnsrecord-add example.com _foo.tcp --srv-rec="0 0
          53 foo1.example.com."
          <br>
                 # ipa dnsrecord-add example.com _foo.tcp --srv-rec="0 0
          53 foo2.example.com."
          <br>
                 # ipa dnsrecord-add example.com _foo.tcp --srv-rec="0 0
          53 foo3.example.com."
          <br>
          <br>
           2. To Petr's point about registering the "_foo.tcp" service.
          By definition this isn't really
          <br>
                a true "service" and more like "CNAME with benefits".
          (Sorry, couldn't resist the bad dating reference ;-))
          <br>
                Do I actually still need to add this to /etc/services?
          If so, then I'd have to do that for
          <br>
                all hosts in the environment, IdM servers, clients,
          etc., correct?
          <br>
          <br>
                Truth be told, this is just being used for an
          alternative to a true h/w, s/w load balancer
          <br>
                for demonstration purposes so I'm sure adding it to the
          services file makes sense.
          <br>
        </blockquote>
        <br>
        Gah! I meant to say I'm *not* sure adding it to the services
        file makes sense.
        <br>
        <br>
        <br>
        <blockquote type="cite">
          <br>
          Thank you both!
          <br>
          <br>
          -m
          <br>
          <br>
          <br>
          <br>
          <br>
          On 07/22/2014 03:16 AM, Petr Spacek wrote:
          <br>
          <blockquote type="cite">On 22.7.2014 00:13, Mark Heslin wrote:
            <br>
            <blockquote type="cite">Hi All,
              <br>
              <br>
              I had some off-list exchanges with Petr Spacek on this but
              am still trying to
              <br>
              work out the correct syntax.
              <br>
              I have 2 hosts:
              <br>
              <br>
                  - foo1.example.com
              <br>
                  - foo2.example.com
              <br>
              <br>
              and would like to create a round-robin DNS srv record for
              both called
              <br>
              foo.example.com
              <br>
              <br>
              I already have DNS entries for both hosts in IPA:
              <br>
              <br>
                 # ipa dnsrecord-show example.com foo1
              <br>
                   Record name: foo1
              <br>
                   A record: 10.0.0.1
              <br>
                 # ipa dnsrecord-show example.com foo2
              <br>
                   Record name: foo2
              <br>
                   A record: 10.0.0.2
              <br>
              <br>
              I'd like to get the correct syntax for adding the srv
              record for foo.
              <br>
              My understanding is that it should be something like this:
              <br>
              <br>
                 # ipa dnsrecord-add example.com _foo.tcp --srv-rec="0
              50 53 foo1.example.com"
              <br>
                 Record name: _foo.tcp
              <br>
                 SRV record: 0 50 53 foo1.example.com
              <br>
                 # ipa dnsrecord-add example.com _foo.tcp --srv-rec="0
              50 53 foo2.example.com"
              <br>
                 Record name: _foo.tcp
              <br>
                 SRV record: 0 50 53 foo2.example.com
              <br>
              <br>
              which seemed to be added ok but on second glance I think
              not:
              <br>
              <br>
                 # host -t srv _foo.tcp.example.com
              <br>
                 _foo.tcp..example.com has SRV record 0 50 53
              foo1.example.com.example.com.
              <br>
                 _foo.tcp..example.com has SRV record 0 50 53
              foo2.example.com.example.com.
              <br>
              <br>
              In looking over the description of rfc2782
              <br>
              <a class="moz-txt-link-rfc2396E" href="http://en.wikipedia.org/wiki/SRV_record"><http://en.wikipedia.org/wiki/SRV_record></a> it appears
              the IPA syntax is a
              <br>
              little different,
              <br>
            </blockquote>
            <br>
            I don't think so :-)
            <br>
            <br>
            Please note the trailing dot in "target" part of
            <a class="moz-txt-link-freetext" href="http://en.wikipedia.org/wiki/SRV_record#Record_format">http://en.wikipedia.org/wiki/SRV_record#Record_format</a>.
            <br>
            <br>
            IPA behaves in the same way as BIND 9: All domain names
            without trailing dot are automatically extended with zone
            origin, i.e. "example.com.".
            <br>
            <br>
            You have two options:
            <br>
            # ipa dnsrecord-add example.com _foo.tcp --srv-rec="0 50 53
            foo1" (DNS server will automatically append "example.com.")
            <br>
            <br>
            or
            <br>
            <br>
            # ipa dnsrecord-add example.com _foo.tcp --srv-rec="0 50 53
            foo1.example.com."
            <br>
            (please note the trailing dot)
            <br>
            <br>
            <br>
            <br>
            Another note is about "_foo". "foo" should be "service name"
            according to
            <br>
            <a class="moz-txt-link-freetext" href="http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml">http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml</a>
            <br>
            <br>
            It will probably not cause any problems if you invent your
            own name (preferably prefixed with x- to avoid collisions in
            future, e.g. "_x-foo"), but it will not hurt you if you
            register your protocol into the registry :-)
            <br>
            See <a class="moz-txt-link-freetext" href="http://tools.ietf.org/html/rfc6335">http://tools.ietf.org/html/rfc6335</a>
            <br>
            <br>
            <blockquote type="cite">and the documentation is scarce so
              admittedly I'm taking a swag at this ;-)
              <br>
              <br>
              I can do this fine without srv but don't have enough
              familiarity with DNS srv
              <br>
              here.
              <br>
              Can anyone help clarify what I'm missing? I'd like to have
              equal weighting,
              <br>
              priority
              <br>
              to both hosts - I'm assuming the port (53) is correct for
              DNS here as well.
              <br>
            </blockquote>
            What are you trying to achieve? The port number refers to
            port used by your application, not to DNS.
            <br>
            <br>
          </blockquote>
          <br>
          <br>
        </blockquote>
        <br>
        <br>
      </blockquote>
      <br>
      <br>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Martin Basti</pre>
  </body>
</html>