Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Aug 2014 17:40:27 -0700
From:      Peter Wemm <peter@wemm.org>
To:        freebsd-net@freebsd.org
Cc:        freebsd@jonathanprice.org
Subject:   Re: Should I be using ipv6_activate_all_interfaces or ip6addrctl_policy="ipv6_prefer"
Message-ID:  <2173103.SJdXL7NPLT@overcee.wemm.org>
In-Reply-To: <88a42e1006e3fac7508a9419e342f1b2@mail.jonathanprice.org>
References:  <88a42e1006e3fac7508a9419e342f1b2@mail.jonathanprice.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Tuesday 26 August 2014 10:40:27 freebsd@jonathanprice.org wrote:
> Hello,
> 
> I am configuring a server with IPv4 and IPv6 addresses and have noticed that
> FreeBSD seems to be preferring IPv4, such as when establishing SSH
> connections.
> 
> After reading through /etc/defaults/rc.conf, and later /etc/rc.d/ip6addrctl
> I have come to the conclusion that I have two ways to tell FreeBSD to
> prefer IPv6:
> 
> 1) Add ipv6_activate_all_interfaces to /etc/rc.conf
> 2) Add ip6addrctl_policy="ipv6_prefer" to /etc/rc.conf
> 
> Could anybody with a little more knowledge on the matter explain to me which
> of the two options is more preferential?

They both do different things.

The activate knob is to enable ipv6 on an interface.  To oversimplify it, if 
you configure an address on an interface, it is "enabled".  However, this 
switch enables this on all the rest of the interfaces, even the ones you 
didn't configure.

ip6addrctl* affects things like hostname lookups to sort the addresses returned 
to the caller.

They are different things entirely.  I think you are expecting the behavior 
that ip6_prefer policy gives you.  That's what we use in the freebsd.org 
cluster to have it use ipv6 where possible.

-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAABAgAGBQJT/Sj/AAoJEDXWlwnsgJ4ErZ0IAKqJz4CEMdURIooA25k1YV5e
vDCVO/6zSnMG6i7NbbcEXDvxONnkIkd0v57yLAidx5KZjd5SezbGsJAoCas8GxOc
jOKkdkwAAGeX4TkoroQRFIhaCY6f0AeR9ZIc/6Ei7a9yMHyqsNe8C60goTZy4yXX
gLxB5Oob8JtGVYMasQpckBLwzXfWibhW8MFdDIEKxo3UsLhnS6wAQZWnOAfYQ6f0
dp9SudFLQr3SZR5sl7Vi1Ebc5f7aVG/aufNxPfVhOSOKa8PNgloKdFsb6adveuSL
K/iALInwn0qFbKBadBARWmlZwaNExYXNLseA4dWW5ZbSRyYKRcjw2jZmpNiPhwQ=
=+AgE
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2173103.SJdXL7NPLT>