Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Aug 2014 08:20:35 +0000
From:      freebsd@jonathanprice.org
To:        "Kevin Oberman" <rkoberman@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Should I be using ipv6_activate_all_interfaces or  ip6addrctl_policy="ipv6_prefer"
Message-ID:  <2c1d74944371a4be730ff1b666489467@mail.jonathanprice.org>
In-Reply-To: <CAN6yY1uxft_3cTkWV8NTnOai-928DnS3uW-XyD3BwcCvjBKeQw@mail.gmail.com>
References:  <CAN6yY1uxft_3cTkWV8NTnOai-928DnS3uW-XyD3BwcCvjBKeQw@mail.gmail.com> <88a42e1006e3fac7508a9419e342f1b2@mail.jonathanprice.org>  <2173103.SJdXL7NPLT@overcee.wemm.org>  <53FD7B34.1050408@jonathanprice.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> While doubting Peter's networking answers is usually foolish, I think t=
his=0A> one is at least a bit misleading. As he says,=0A> ipv6_activate_a=
ll_interfaces=3D"YES" will set all interfaces on the system to=0A> -ifdis=
able which, since it is an IPv6 option, will enable IPv6 on all=0A> inter=
faces. NO will disable IPv6 on all interfaces.=0A> =0A> But it is related=
 to ipaddrctl_policy as it will set ipaddrctl_policy to=0A> "ipv6_prefer"=
 if no explicit setting overrides it.=0A> =0A> So IPv6 is working, and "s=
sh -6" does use IPv6. I'd still like to see the=0A> output of ip6addrctl.=
 It should look like:=0A> ::1/128 50 0=0A> ::/0 40 1=0A> ::ffff:0:0/96 35=
 4=0A> 2002::/16 30 2=0A> 2001::/32 5 5=0A> fc00::/7 3 13=0A> ::/96 1 3=
=0A> fec0::/10 1 11=0A> 3ffe::/16 1 12=0A> =0A> For more explanation, loo=
k at /etc/rc.d/ip6addrctl and /etc/network.subr.=0A> =0A> The list of pre=
fixes set by it should match what I list above. If=0A> 'ipv6_activate_all=
_interfaces=3D"NO"', or ipaddrctl_policy=3D"ipv4_prefer",=0A> you should =
get:=0A> ::1/128 50 0=0A> ::/0 40 1=0A> ::ffff:0:0/96 100 4=0A> 2002::/16=
 30 2=0A> 2001::/32 5 5=0A> fc00::/7 3 13=0A> ::/96 1 3=0A> fec0::/10 1 1=
1=0A> 3ffe::/16 1 12=0A> =0A> Any other output indicates manual setting o=
f the policy. the "magic" is the=0A> precedence of ::ffff:0:0/96 which is=
 an odd way of saying IPv4.=0A> I generally recommend ipv6_activate_all.=
=0A> =0A> Now I fear Peter will explain how I have misread the code.=0A=
=0APlease excuse me if I'm wrong, but I think ipv6_activate_all_interface=
s=3D"NO" only=0Aifdisable's interfaces which don't explicitly have an ifc=
onfig_IF_ipv6 line. Partly=0Abecause it's set to NO by default, and partl=
y because of the following extract from=0A/etc/defaults/rc.conf:=0A=0A"If=
 NO, interfaces which have no corresponding $ifconfig_IF_ipv6 is marked a=
s IFDISABLED for security reason."=0A=0AThis being the case, what exactly=
 does the ifdisable stop the interface doing if it=0Adoesn't have an addr=
ess anyway?=0A=0AYes, I'd also noticed /etc/rc.d/ip6addrctl, that's actua=
lly what got me curious about=0Athis in the first place, as I could essen=
tially achieve my desired effect with both =0Aipv6_activate_all_interface=
s=3D"YES" and ip6addrctl_policy=3D"ipv6_prefer".=0A=0ASure, below is the =
output of ip6addrctl from a server without either tunable (meaning,=0Abot=
h were removed from rc.conf completely):=0A=0APrefix                     =
     Prec Label      Use=0A::1/128                           50     0    =
    0=0A::/0                              40     1       90=0A::ffff:0.0.=
0.0/96                100     4        0=0A2002::/16                     =
    30     2        0=0A2001::/32                          5     5       =
 0=0Afc00::/7                           3    13        0=0A::/96         =
                     1     3        0=0Afec0::/10                        =
  1    11        0=0A3ffe::/16                          1    12        0=
=0A=0ABelow is the output of ip6addrctl after rebooting with just "ipv6_a=
ctivate_all_interfaces=3DYES"=0A=0APrefix                          Prec L=
abel      Use=0A::1/128                           50     0        0=0A::/=
0                              40     1       68=0A::ffff:0.0.0.0/96     =
            35     4        0=0A2002::/16                         30     =
2        0=0A2001::/32                          5     5        0=0Afc00::=
/7                           3    13        0=0A::/96                    =
          1     3        0=0Afec0::/10                          1    11  =
      0=0A3ffe::/16                          1    12        0=0A=0AAnd fi=
nally, below is the output of ip6addrctl after rebooting with just ip6add=
rctl_policy=3D"ipv6_prefer"=0A=0APrefix                          Prec Lab=
el      Use=0A::1/128                           50     0        0=0A::/0 =
                             40     1       72=0A::ffff:0.0.0.0/96       =
          35     4        0=0A2002::/16                         30     2 =
       0=0A2001::/32                          5     5        0=0Afc00::/7=
                           3    13        0=0A::/96                      =
        1     3        0=0Afec0::/10                          1    11    =
    0=0A3ffe::/16                          1    12        0=0A=0ASo that =
does prove that, at least for the purposes of ip6addrctl, the two tunable=
s are performing=0Athe same function.



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