From owner-freebsd-net@FreeBSD.ORG Wed Aug 27 00:40:33 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73ABF299 for ; Wed, 27 Aug 2014 00:40:33 +0000 (UTC) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E37A373A for ; Wed, 27 Aug 2014 00:40:33 +0000 (UTC) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id EBC8E5D6; Tue, 26 Aug 2014 17:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1409100032; bh=+X9O82yode9+fRPAYYDUWMhrl5chPGUJX/Es+K2xsKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Tqy/rjB97eOy+l/kbKCE9MPCYo7rvtNcBWj+vjDE1k7gwn6auR6E+NEDKan5mqAVp Jeo/YlJeVOBxW1mMLe29tQAbwH0sQFL7OOGKw62nim1D6LNenZaHdZwCN5L6GITeno BE8WJGWeDe2pEaIzdhetdbSRgwEFtngVrm+ppkAc= From: Peter Wemm To: freebsd-net@freebsd.org Subject: Re: Should I be using ipv6_activate_all_interfaces or ip6addrctl_policy="ipv6_prefer" Date: Tue, 26 Aug 2014 17:40:27 -0700 Message-ID: <2173103.SJdXL7NPLT@overcee.wemm.org> User-Agent: KMail/4.12.5 (FreeBSD/11.0-CURRENT; KDE/4.12.5; amd64; ; ) In-Reply-To: <88a42e1006e3fac7508a9419e342f1b2@mail.jonathanprice.org> References: <88a42e1006e3fac7508a9419e342f1b2@mail.jonathanprice.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart17931494.YGa4yGzs8L"; micalg="pgp-sha1"; protocol="application/pgp-signature" Cc: freebsd@jonathanprice.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2014 00:40:33 -0000 --nextPart17931494.YGa4yGzs8L Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" On Tuesday 26 August 2014 10:40:27 freebsd@jonathanprice.org wrote: > Hello, >=20 > I am configuring a server with IPv4 and IPv6 addresses and have notic= ed that > FreeBSD seems to be preferring IPv4, such as when establishing SSH > connections. >=20 > After reading through /etc/defaults/rc.conf, and later /etc/rc.d/ip6a= ddrctl > I have come to the conclusion that I have two ways to tell FreeBSD to= > prefer IPv6: >=20 > 1) Add ipv6_activate_all_interfaces to /etc/rc.conf > 2) Add ip6addrctl_policy=3D"ipv6_prefer" to /etc/rc.conf >=20 > Could anybody with a little more knowledge on the matter explain to m= e 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 i= t, if=20 you configure an address on an interface, it is "enabled". However, th= is=20 switch enables this on all the rest of the interfaces, even the ones yo= u=20 didn't configure. ip6addrctl* affects things like hostname lookups to sort the addresses = returned=20 to the caller. They are different things entirely. I think you are expecting the beha= vior=20 that ip6_prefer policy gives you. That's what we use in the freebsd.or= g=20 cluster to have it use ipv6 where possible. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart17931494.YGa4yGzs8L Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABAgAGBQJT/Sj/AAoJEDXWlwnsgJ4ErZ0IAKqJz4CEMdURIooA25k1YV5e vDCVO/6zSnMG6i7NbbcEXDvxONnkIkd0v57yLAidx5KZjd5SezbGsJAoCas8GxOc jOKkdkwAAGeX4TkoroQRFIhaCY6f0AeR9ZIc/6Ei7a9yMHyqsNe8C60goTZy4yXX gLxB5Oob8JtGVYMasQpckBLwzXfWibhW8MFdDIEKxo3UsLhnS6wAQZWnOAfYQ6f0 dp9SudFLQr3SZR5sl7Vi1Ebc5f7aVG/aufNxPfVhOSOKa8PNgloKdFsb6adveuSL K/iALInwn0qFbKBadBARWmlZwaNExYXNLseA4dWW5ZbSRyYKRcjw2jZmpNiPhwQ= =+AgE -----END PGP SIGNATURE----- --nextPart17931494.YGa4yGzs8L--