gifconfig_gifX not working with cloned_interfaces?

Kimmo Paasiala kpaasial at icloud.com
Wed Feb 12 11:13:28 UTC 2014


On 11.2.2014, at 23.50, Hiroki Sato <hrs at freebsd.org> wrote:

> Kimmo Paasiala <kpaasial at icloud.com> wrote
>  in <F73EF686-ECA1-4F70-9D15-7D8C336A4FB7 at icloud.com>:
> 
> kp> 
> kp> On 22.12.2013, at 12.05, Kimmo Paasiala <kpaasial at icloud.com> wrote:
> kp> 
> kp> > 
> kp> > On 22.12.2013, at 12.01, Olivier Cochard-Labbé <olivier at cochard.me>
> kp> > wrote:
> kp> > 
> kp> >> On Sat, Dec 21, 2013 at 9:27 PM, Kimmo Paasiala <kpaasial at icloud.com>
> kp> >> wrote:
> kp> >>> 
> kp> >>> FreeBSD 10.0-RC2 r259413 i386.
> kp> >>> 
> kp> >>> I have this set up in rc.conf:
> kp> >>> 
> kp> >>> cloned_interfaces="gif0"
> kp> >>> gifconfig_gif0="88.xxx.xxx.xxx 62.yyy.yyy.yyy"
> kp> >>> ifconfig_gif0_ipv6="inet6 2001:14b8:aaa:bbb::2 2001:14b8:aaa:bbb::1
> kp> >>> prefixlen 128”
> kp> >>> 
> kp> >>> I’m not using gif_interfaces=“gif0” since it’s deprecated as per
> kp> >>> the warning messages spewed by the rc(8) scripts.
> kp> >>> 
> kp> >>> However this does not work properly The ‘ifconfig gif0 tunnel
> kp> >>> 88.xxx.xxx.xxx 62.yyy.yyy.yyy’ does not get executed. It looks to me
> kp> >>> that the tunnel set up is only performed when gif0 is listed in
> kp> >>> gif_interfaces.
> kp> >>> 
> kp> >>> I can work around this by doing this instead of the 'gifconfig_gif0'
> kp> >>> line:
> kp> >>> 
> kp> >>> ifconfig_gif0=“ tunnel 88.xxx.xxx.xxx 62.yyy.yyy.yyy”
> kp> >>> 
> kp> >> 
> kp> >> Hi,
> kp> >> 
> kp> >> You can configure gif interface like a standard interface (without
> kp> >> using gifconfig_), here is an example:
> kp> >> 
> kp> >> cloned_interfaces="gif0 gif1"
> kp> >> ifconfig_gif0="inet 10.0.24.2/24 10.0.24.4 tunnel 10.0.23.2 10.0.34.4
> kp> >> up"
> kp> >> ifconfig_gif1_ipv6="inet6 2001:db8:24::2 prefixlen 64 tunnel
> kp> >> 2001:db8:23::2 2001:db8:34::4 up"
> kp> >> 
> kp> >> Regards,
> kp> >> 
> kp> >> Olivier
> kp> > 
> kp> > Hi,
> kp> > 
> kp> > Yes I know. I did note that in my workaround for the problem. However,
> kp> > the rc.conf(5) manual page claims that gifconfig_gifX should still
> kp> > work and that’s why I’m reporting the issue.
> kp> > 
> kp> > -Kimmo
> kp> > 
> kp> 
> kp> Hello,
> kp> 
> kp> Has anyone had time to look at this issue? I could try to come up with
> kp> a fix myself but I’d first like to know what is the proper way
> kp> configure gif(4) interfaces with FreeBSD 10. If gif_interfaces is
> kp> deprecated then is gifconfig_gifX also deprecated? If gifconfig_gifX
> kp> is also deprecated then this is a documentation issue and also the
> kp> rc(8) scripts should warn about using it like they do now warn about
> kp> gif_interfaces. If gifconfig_gifX is still valid then something must
> kp> be done about the handling of cloned_interfaces in rc.conf.
> 
> gifconfig_gifN is also deprecated.  Combination of gif_interfaces and
> gifconfig_gifN still works, but it should be rewritten with
> cloned_interfaces and ifconfig_IF.  I will add an warning message to
> gifconfig_gifN, too.
> 
> -- Hiroki

Hello,

Thanks for the information. I think the rc.conf(5) manual page needs updating as well for FreeBSD 10. It now says:

gif_interfaces
                 (str) This variable is deprecated in favor of
                 cloned_interfaces.  Set to the list of gif(4) tunnel inter‐
                 faces to configure on this host.  A gifconfig_⟨interface⟩
                 variable is assumed to exist for each value of interface.
                 The value of this variable is used to configure the link
                 layer of the tunnel according to the syntax of the tunnel
                 option to ifconfig(8).  Additionally, this option ensures
                 that each listed interface is created via the create option
                 to ifconfig(8) before attempting to configure it.

This should be reworded so that it says that gifconfig_<interface> is also a deprecated variable and also mention that it does not work with cloned_interfaces (the reason for my PR). Also it should be mentioned that the proper way to configure the tunnel part of the gif(4) interface is to use ifconfig_gifN=“tunnel my.ip their.ip”. Maybe it’s also worth repeating the information in the gif(4) manual page?

-Kimmo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20140212/50005095/attachment.sig>


More information about the freebsd-net mailing list