summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2010-04-09 01:35:09 +0000
committerdougb <dougb@FreeBSD.org>2010-04-09 01:35:09 +0000
commit2ae521fa83381fb37d51c9fbaa4bf010e9118a70 (patch)
tree04c99d982a6edeed63d52af2b85b3cad62c33907 /share
parent4f086c2604dc3f689c57c6e0619187d74ddb1ca2 (diff)
downloadFreeBSD-src-2ae521fa83381fb37d51c9fbaa4bf010e9118a70.zip
FreeBSD-src-2ae521fa83381fb37d51c9fbaa4bf010e9118a70.tar.gz
Improve the handling of IPv6 configuration in rc.d. The ipv6_enable
and ipv6_ifconfig_<interface> options have already been deprecated, these changes do not alter that. With these changes any value set for ipv6_enable will emit a warning. In order to avoid a POLA violation for the deprecation of the option ipv6_enable=NO will still disable configuration for all interfaces other than lo0. ipv6_enable=YES will not have any effect, but will emit an additional warning. Support and warnings for this option will be removed in FreeBSD 10.x. Consistent with the current code, in order for IPv6 to be configured on an interface (other than lo0) an ifconfig_<interface>_ipv6 option will have to be added to /etc/rc.conf[.local]. 1. Clean up and minor optimizations for the following functions: ifconfig_up (the ipv6 elements) ipv6if ipv6_autoconfif get_if_var _ifconfig_getargs The cleanups generally were to move the "easy" tests earlier in the functions, and consolidate duplicate code. 2. Stop overloading ipv6_prefer with the ability to disable IPv6 configuration. 3. Remove noafif() which was only ever called from ipv6_autoconfif. Instead, simplify and integrate the tests into that function, and convert the test to use is_wired_interface() instead of listing wireless interfaces explicitly. 4. Integrate backwards compatibility for ipv6_ifconfig_<interface> into _ifconfig_getargs. This dramatically simplifies the code in all of the callers, and avoids a lot of other code duplication. 5. In rc.d/netoptions, add code for an ipv6_privacy option to use RFC 4193 style pseudo-random addresses (this is what windows does by default, FYI). 6. Add support for the [NO]RTADV options in ifconfig_getargs() and ipv6_autoconfif(). In the latter, include support for the explicit addition of [-]accept_rtadv in ifconfig_<interface>_ipv6 as is done in the current code. 7. In rc.d/netif add a warning if $ipv6_enable is set, and remove the set_rcvar_obsolete for it. Also remove the latter from rc.d/ip6addrctl. 8. In /etc/defaults/rc.conf: Add an example for RTADV configuration. Set ipv6_network_interfaces to AUTO. Switch ipv6_prefer to YES. If ipv6_enable is not set this will have no effect. Add a default for ipv6_privacy (NO). 9. Document all of this in rc.conf.5.
Diffstat (limited to 'share')
-rw-r--r--share/man/man5/rc.conf.5129
1 files changed, 74 insertions, 55 deletions
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index ec3f292..59e338b 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 05, 2010
+.Dd April 8, 2010
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -1292,79 +1292,98 @@ It is also possible to rename an interface by doing:
ifconfig_ed0_name="net0"
ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00"
.Ed
+.\" Remove in FreeBSD 10.x
.It Va ipv6_enable
.Pq Vt bool
-If the variable is
-.Dq Li YES ,
-.Dq Li inet6 accept_rtadv
-is added to all of
-.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
-and the
-.Va ipv6_prefer
-is defined as
-.Dq Li YES .
.Pp
-This variable is deprecated. Use
-.Va ipv6_prefer
-and
-.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 .
-.It Va ipv6_prefer
-.Pq Vt bool
-This variable does the following:
+This option is deprecated.
.Pp
If the variable is
-.Dq Li YES ,
-the default policy of the source address selection set by
-.Xr ip6addrctl 8
-will be IPv6-preferred.
+.Dq Li YES
+it has no effect.
+To configure IPv6 for an interface see
+.Va ipv6_network_interfaces
+below.
.Pp
If the variable is
-.Dq Li NO ,
-the default policy of the source address selection set by
-.Xr ip6addrctl 8
-will be IPv4-preferred, and all of interfaces which does not have the
-corrsponding
-.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
-variable will be marked as
-.Dq Li IFDISABLED .
-This means only IPv6 functionality on that interface is completely
-disabled. For more details of
-.Dq Li IFDISABLED
-flag and keywords
-.Dq Li inet6 ifdisabled ,
-see
-.Xr ifconfig 8 .
-.Pp
+.Dq Li NO
+then other than
+.Dq Li lo0
+IPv6 will be disabled for each interface,
+however the same effect can be achieved by
+not configuring the interface.
.It Va ipv6_network_interfaces
.Pq Vt str
This is the IPv6 equivalent of
.Va network_interfaces .
-Normally manual configuration of this variable is not needed.
+Normally configuration of this variable is not needed,
+the value should be left as
+.Dq Li AUTO .
+.Pp
+If
+.Dq Li INET6
+is configured in the kernel configuration for the
+.Dq Li lo0
+interface will always be performed.
+It is not necessary to list it in
+.Va ipv6_network_interfaces .
+.Pp
+Example configuration to accept Router Advertisements (RA) for the
+.Dq Li ed0
+interface:
+.Bd -literal
+ifconfig_ed0_ipv6="RTADV"
+.Ed
+.Pp
+To disable RA the
+.Dq Li NORTADV
+option is available, although not required if manual
+configuration is performed as described below.
+.Pp
+An IPv6 interface can be configured manually with
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 .
+For example:
+.Bd -literal
+ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64"
+.Ed
+.Pp
+Manual configuration of an IPv6 address will also
+require configuration of the
+.Va ipv6_defaultrouter
+option.
.Pp
-IPv6 functionality on an interface should be configured by
-.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 ,
-instead of setting ifconfig parameters in
-.Va ifconfig_ Ns Aq Ar interface .
Aliases should be set by
.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n
-with
+with the
.Dq Li inet6
-keyword. For example:
+keyword.
+For example:
+.Pp
.Bd -literal
-ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64"
ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64"
.Ed
.Pp
-Interfaces that have an
-.Dq Li inet6 accept_rtadv
-keyword in
-.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
-setting will be automatically configured by
-.Xr rtsol 8 .
-Note that this automatic configuration is disabled if the
-.Va ipv6_gateway_enable
-is set to
-.Dq Li YES .
+.It Va ipv6_prefer
+.Pq Vt bool
+If the variable is
+.Dq Li YES ,
+the default policy of the source address selection set by
+.Xr ip6addrctl 8
+will be IPv6-preferred.
+.Pp
+If the variable is
+.Dq Li NO ,
+the default policy of the source address selection set by
+.Xr ip6addrctl 8
+will be IPv4-preferred.
+.Pp
+.It Va ipv6_privacy
+.Pq Vt bool
+If the variable is
+.Dq Li YES
+privacy addresses will be generated for each IPv6
+interface as described in RFC 4193.
+.Pp
.It Va ipv6_prefix_ Ns Aq Ar interface
.Pq Vt str
If one or more prefixes are defined in
OpenPOWER on IntegriCloud