Followup to r362502: rc.conf(5): unobsolete gif_interfaces

There are cases when gif_interfaces cannot be replaced
with cloned_interfaces, such as tunnels with external IPv6 addresses
and internal IPv4 or vice versa. Such configuration requires
extra invocation of ifconfig(8) and supported with gif_interfaces only.

Fix manual page and provide some examples.

MFC after:	1 week
X-MFC-With:	362502
This commit is contained in:
Eugene Grosbein 2020-06-22 17:52:13 +00:00
parent 064dde3efe
commit 8e47856b2f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362503

View File

@ -24,7 +24,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd June 8, 2020 .Dd June 23, 2020
.Dt RC.CONF 5 .Dt RC.CONF 5
.Os .Os
.Sh NAME .Sh NAME
@ -1862,46 +1862,35 @@ Even if this variable is specified to
.Dq :nosticky .Dq :nosticky
keyword can be used to override it on per interface basis. keyword can be used to override it on per interface basis.
.It Va gif_interfaces .It Va gif_interfaces
.Pq Vt str
This variable is deprecated in favor of
.Va cloned_interfaces .
Set to the list of Set to the list of
.Xr gif 4 .Xr gif 4
tunnel interfaces to configure on this host. tunnel interfaces to configure on this host.
For each A
.Xr gif .Va gifconfig_ Ns Aq Ar interface
tunnel interface, set a variable named variable is assumed to exist for each value of
.Va ifconfig_ Ns Aq Ar interface .Ar interface .
with the parameters for the
.Xr ifconfig 8
command to configure the link level for
.Ar interface
with the
.Cm tunnel
option.
The value of this variable is used to configure the link layer of the The value of this variable is used to configure the link layer of the
tunnel using the tunnel using the
.Cm tunnel .Cm tunnel
option to option to
.Xr ifconfig . .Xr ifconfig .
For example, configure two
.Xr gif
interfaces with:
.Bd -literal -offset indent
gif_interfaces="gif0 gif1"
ifconfig_gif0="tunnel src_addr0 dst_addr0"
ifconfig_gif1="tunnel src_addr1 dst_addr1"
.Ed
.Pp
Additionally, this option ensures that each listed interface is created Additionally, this option ensures that each listed interface is created
via the via the
.Cm create .Cm create
option to option to
.Xr ifconfig . .Xr ifconfig
This example also works with before attempting to configure it.
.Va cloned_interfaces .Pp
instead of For example, configure two
.Va gif_interfaces . .Xr gif
interfaces with:
.Bd -literal
gif_interfaces="gif0 gif1"
gifconfig_gif0="100.64.0.1 100.64.0.2"
ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252"
gifconfig_gif1="inet6 2a00::1 2a01::1"
ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252"
.Ed
.It Va sppp_interfaces .It Va sppp_interfaces
.Pq Vt str .Pq Vt str
Set to the list of Set to the list of