Re: autofs reverts to IPv4 for multi-homed IPv6 server ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Sorry for replying to myself again ... but this is important.

> 
> That is why I tried to explain the big picture. For me it is important that it 
> consistently selects the ULA unless specifically instructed to do otherwise.
I used this small program
http://www.logix.cz/michal/devel/various/getaddrinfo.c.xp
to check how the getaddrinfo output is actually sorted. The result (several runs
not shown) on the vm with ubuntu 16.04 is

tckoe@core400:~$ ./a.out core330.bccms.uni-bremen.de
Host: core330.bccms.uni-bremen.de
IPv6 address: fd5f:852:a27c:1261:2000::118 (core330.bccms.uni-bremen.de)
IPv6 address: 2001:638:708:1261:2000::118 ((null))
IPv4 address: 192.168.220.118 ((null))
tckoe@core400:~$ ./a.out core330.bccms.uni-bremen.de
Host: core330.bccms.uni-bremen.de
IPv6 address: 2001:638:708:1261:2000::118 (core330.bccms.uni-bremen.de)
IPv6 address: fd5f:852:a27c:1261:2000::118 ((null))
IPv4 address: 192.168.220.118 ((null))

So clearly IPv6 is sorted before IPv4 (40 program runs) but the ordering of 
IPv6 addresses is not guaranteed. My basic assumption was wrong in that
respect. getaddrinfo does not reliably prefer the ULA if left alone. 

Adding "precedence  fc00::/7      45" to /etc/gai.conf (destination
address selection rule) fixes checking with 20 tests the order in the getaddrinfo 
output. Source address selection ("ip addrlabel") does not come into
this.

To conclude: Even without the response time considerations using pure
getaddrinfo output would not have done what I wanted. If I had not
noticed mount behaving against my expectations I might not have tested
this.

Second, I modified the map with an square bracketed IPv6 address instead 
of a hostname. Using my own autofs package recompiled against libtirpc. 
Trying to mount I see that passing the IPv6 address to autofs in fact
appears to work now, it mounts as expected. See attached log fragment.
Response time checks do not appear to be actually used which is reasonable.
So the idea that there was a problem was probably an artefact of using that
autofs binary without libtiprc on 14.04 , too.

Appart from somehow dealing with the general question of perhaps
making libtirpc a requirement the only request remaining from my
perspective is:
- Would it be possible to document the libtirpc requirement for IPv6 in
  the man page along with a warning about autofs's current behaviour 
  without libtirpc if IPv6 is available ? That might also warn
  distro maintainers.

I think everything is else is settled then. Thank you very much for you
patients and help. And my appologies for perhaps wasting some of your
time, I should have checked getaddrinfo's output directly when you mentioned it. 

I will try the binaries from your ppa next week to see if anything changes.
If you would like to test other things a will of course try to help with
that, too.

Still, I may be a able to save you a bit of time looking up the
interface specifier conventions and requirements for link local
addresses if you still need that information.

getaddrinfo(3) reads  "getaddrinfo() supports the address%scope-id notation for 
specifying the IPv6 scope-ID". Here scope-ID can mean interface as in
"%eth0" for link local addresses. So the syntax is quite universal.
Confirm RFC 4007 Section 11 on which this is probably based.

Making an interface specifier a required address component when using link local 
addresses would be consistent with the example in nfs(5) 
"This  example  shows  how to mount an NFS server using a raw IPv6 link-
 local address.
 [fe80::215:c5ff:fb3e:e2b1%eth0]:/export /mnt nfs defaults 0 0"
which I would read to imply that %interface must always be supplied with
link local addresses, although it does not say so directly in the text.

This requirement would also be conforming to RFC 4007, e.g. Section 11

"
As already mentioned, to specify an IPv6 non-global address without
   ambiguity, an intended scope zone should be specified as well.  As a
   common notation to specify the scope zone, an implementation SHOULD
   support the following format:
            <address>%<zone_id>

...

An implementation could also use interface names as <zone_id> for
   scopes larger than links, but there might be some confusion in this
   use. 
"



Have a nice Weekend, thank you very much for all your effort and again my 
apologies for checking some thinks too late !


Best Regards

Christof

-- 
Dr. rer. nat. Christof Köhler       email: c.koehler@xxxxxxxxxxxxxxxxxxx
Universitaet Bremen/ BCCMS          phone:  +49-(0)421-218-62334
Am Fallturm 1/ TAB/ Raum 3.12       fax: +49-(0)421-218-62770
28359 Bremen  

PGP: http://www.bccms.uni-bremen.de/cms/people/c_koehler/
--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux