On Wed, Aug 27, 2014 at 11:59:25AM +0000, Bjoern A. Zeeb wrote: > > On 27 Aug 2014, at 06:31 , Jonathan Price <free...@jonathanprice.org> wrote: > > > On 2014-08-27 01:40, Peter Wemm wrote: > >> On Tuesday 26 August 2014 10:40:27 free...@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 > >>> ... > > However, it does sound like for my purposes it would make more sense to use > > ip6addrctl_policy=?ipv6_prefer" as that is more explicitly the feature I > > want, rather than getting it inadvertently through the other knob. > > Yes. Definitively. I am not sure if it has happened but if IPv6 config is > configured through rc.conf that setting should be(come) default. >
It does not seem so yet (anymore, it was like that many moons ago). A new install of 11-current, with the following in rc.conf: ################# hostname="fbsd-11-test" ifconfig_em0="DHCP" ifconfig_em0_ipv6="inet6 accept_rtadv" sshd_enable="YES" ################# Output of ip6addrctl: ################# jhay@fbsd-11-test:~ % ip6addrctl Prefix Prec Label Use ::1/128 50 0 0 ::/0 40 1 13 ::ffff:0.0.0.0/96 100 4 0 2002::/16 30 2 0 2001::/32 5 5 0 fc00::/7 3 13 0 ::/96 1 3 0 fec0::/10 1 11 0 3ffe::/16 1 12 0 jhay@fbsd-11-test:~ % ################# telnet to a machine with both ipv6 and ipv4 addresses: ################# jhay@fbsd-11-test:~ % telnet dolphin Trying 146.64.28.14... telnet: connect to address 146.64.28.14: Connection refused Trying 2001:4200:7000:3:223:aeff:fea5:ef... telnet: connect to address 2001:4200:7000:3:223:aeff:fea5:ef: Connection refused telnet: Unable to connect to remote host jhay@fbsd-11-test:~ % ################# I think if an IPv6 address is configured on a machine, it should prefer ipv6 addresses. That would match what the rest are doing. Regards John -- John Hay -- j...@meraka.csir.co.za / j...@meraka.org.za _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"