9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa <arisawa@ar.aichi-u.ac.jp>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] ipv6 and ndb/csquery
Date: Wed, 15 Jul 2015 13:41:38 +0900	[thread overview]
Message-ID: <4F3FE931-6DF5-4D66-9D4E-E6F0537F1A8B@ar.aichi-u.ac.jp> (raw)
In-Reply-To: <03a4bcd9e6053108cc41cff5a379fc0f@felloff.net>

Thanks cinap,

your detailed explanation will be helpful to me and all others.

Kenji Arisawa


> 2015/07/12 0:37、cinap_lenrek@felloff.net のメール:
> 
> when you query /net/dns, it differentiates between ip (A) and ipv6
> (AAAA) records. so querying for "ip" only yields ipv4 addresses and
> querying for "ipv6" yields ipv6 addresses only. it shouldnt matter if
> you use ip= or ipv6= attribute in ndb for this, as ndb/dns is smart
> enogth to check the value of the attribute and figure out if its for
> and A or AAAA record.
> 
> now ndb/cs is concerned about finding an addresses that is reachable
> from your system. i think that is why it reorders the results
> based on local ip interfaces. in any case, ndb/cs will query dns
> for both ipv4 and ipv6 addresses unless you give it (v4 only flag -4).
> 
> when ndb/cs looks for an address in the network database, it only looks
> for the ip= attribute and ignores ipv6= attributes (these are for dns only).
> 
> so if you have no ipv6 connectivity on the lan, but you want to put
> ipv6 AAAA records in your dns server (to serve to the outside world?),
> use the ipv6= attribute in ndb as network database lookups will
> ignore the ipv6= stuff.
> 
> when you have both ipv4 and ipv6 connectivity, you can just use
> ip= attribute for both v4 and v6 addresses, then network database
> lookup will yield both. 
> 
> when a domain has multiple ip addresses, dns will randomize the
> list of results (for a specific record type). ndb/cs queries dns
> for v4 addresses first and v6 addresses last, the (randomized)
> v4 addresses appear before the (randomized) v6 addresses
> (unless cs did reorder the list as it found the v6 address to be
> reachable directly the by a local network interface).
> 
> the results from network database are not randomized (but can be
> reordered) by ndb/cs:
> 
> sys=testa ip=89.186.156.12 
> 	ip=2001:470:1f0a:a61::2
> 
> sys=testb ip=2001:470:1f0a:a61::2
> 	ip=89.186.156.12 
> 
>> net!testa!*
> /net.alt/il/clone 89.186.156.12!*!fasttimeout
> /net.alt/il/clone 2001:470:1f0a:a61::2!*!fasttimeout
> /net.alt/tcp/clone 89.186.156.12!*
> /net.alt/tcp/clone 2001:470:1f0a:a61::2!*
> /net.alt/il/clone 89.186.156.12!*
> /net.alt/il/clone 2001:470:1f0a:a61::2!*
>> net!testb!*
> /net.alt/il/clone 2001:470:1f0a:a61::2!*!fasttimeout
> /net.alt/il/clone 89.186.156.12!*!fasttimeout
> /net.alt/tcp/clone 2001:470:1f0a:a61::2!*
> /net.alt/tcp/clone 89.186.156.12!*
> /net.alt/il/clone 2001:470:1f0a:a61::2!*
> /net.alt/il/clone 89.186.156.12!*
> 
> dial() processes the list from cs in sequential order, unless
> you use geoffs parallel dial implementation which connects to
> some bounded number of addresses in parallel.
> 
> still the ordering of what cs returns is in most prefered first,
> and it is up to cs to define that order. like it *could* decide to
> always put ipv6 addresses first, but i think this was not done because
> in the labs the v6 network was less reliable than the v4 network?
> 
> --
> cinap
> 




      reply	other threads:[~2015-07-15  4:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-04  5:30 arisawa
2015-07-06 17:01 ` cinap_lenrek
2015-07-11 13:01   ` arisawa
2015-07-11 15:37     ` cinap_lenrek
2015-07-15  4:41       ` arisawa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F3FE931-6DF5-4D66-9D4E-E6F0537F1A8B@ar.aichi-u.ac.jp \
    --to=arisawa@ar.aichi-u.ac.jp \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).