Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interfaces: optionally support "auto_linklocal" in bridges #926

Closed
nanosonde opened this issue May 4, 2016 · 7 comments
Closed

interfaces: optionally support "auto_linklocal" in bridges #926

nanosonde opened this issue May 4, 2016 · 7 comments
Assignees
Labels
feature Adding new functionality
Milestone

Comments

@nanosonde
Copy link

I am using OPNsense has a transparent filtering bridge, where WAN and LAN are bridged.
The new bridge interface works successfully for IPv4, but not for IPv6 as it does not receive a link local address, although I tried the DHCPv6 and SLAAC setting in the webgui for IPv6 interface configuration.

My main router's DHCPv6 server is configured to provide IA_PD and IA_ND.

Any idea how to fix this?

@nanosonde
Copy link
Author

nanosonde commented May 8, 2016

After doing some research I have found this pfSense issue.

The FreeBSD man page (man 4 if_bridge) says:

IPV6 SUPPORT
     if_bridge supports the AF_INET6 address family on bridge interfaces.  The
     following rc.conf(5) variable configures an IPv6 link-local address on
     bridge0 interface:

       ifconfig_bridge0_ipv6="up"

     or in a more explicit manner:

       ifconfig_bridge0_ipv6="inet6 auto_linklocal"

     However, the AF_INET6 address family has a concept of scope zone.  Bridg-
     ing multiple interfaces change the zone configuration because multiple
     links are merged to each other and form a new single link while the mem-
     ber interfaces still work individually.  This means each member interface
     still has a separate link-local scope zone and the if_bridge interface
     has another single, aggregated link-local scope zone at the same time.
     This situation is clearly against the description "zones of the same
     scope cannot overlap" in Section 5, RFC 4007.  Although it works in most
     cases, it can cause some conterintuitive or undesirable behavior in some
     edge cases when both of the if_bridge interface and one of the member
     interface have an IPv6 address and applications use both of them.

     To prevent this situation, if_bridge checks whether a link-local scoped
     IPv6 address is configured on a member interface to be added and the
     if_bridge interface.  When the if_bridge interface has IPv6 addresses,
     IPv6 addresses on the member interface will be automatically removed
     before the interface is added.

     This behavior can be disabled by setting sysctl(8) variable
     net.link.bridge.allow_llz_overlap to 1.

     Note that ACCEPT_RTADV and AUTO_LINKLOCAL interface flag are not enabled
     by default on if_bridge interface even when net.inet6.ip6.accept_rtadv
     and/or net.inet6.ip6.auto_linklocal is set to 1.

At the console I have manually setup a link local IPv6 address on the bridge interface which seems to work currently. The bridge interface receives an IPv6 address from the main router.

So it seems that OPNsense needs some enhancement to take care of this.

@fichtner fichtner self-assigned this Jul 23, 2016
@fichtner fichtner added the feature Adding new functionality label Jul 23, 2016
@fichtner fichtner added this to the 17.1 milestone Jul 23, 2016
@fichtner fichtner modified the milestones: 17.7, 17.1 Jan 23, 2017
@fichtner fichtner modified the milestones: 18.1, 17.7 Jul 21, 2017
@fichtner fichtner modified the milestones: 18.1, Future Dec 31, 2017
@fichtner fichtner removed their assignment Dec 31, 2017
@fichtner fichtner added the help wanted Contributor missing / timeout label Dec 31, 2017
@karl047
Copy link

karl047 commented Jul 29, 2018

I found this Mail in Internet:
https://lists.freebsd.org/pipermail/freebsd-net/2009-April/021675.html
it looks like the problem with the bridge Interface ist known about 10 years ago!

Can you tell me please how I can enter the IPv6 link-local manually for the Bridge Interface on OPNsense at the console?

I'm looking for a solution since 3 months but no chance :-(

@fichtner fichtner removed this from the Future milestone Jul 30, 2018
@fichtner fichtner added support Community support and removed feature Adding new functionality help wanted Contributor missing / timeout labels Dec 30, 2018
@fichtner
Copy link
Member

fichtner commented Dec 30, 2018

Due to a private request: tickets are closed after a few months of inactivity to avoid stale work queues. I’ll reopen for now, but we need a continuation of discussion.

For the time being I’m absolutely unsure about the state of the described issue in FreeBSD as it relates to OPNsense (11.1 now in 18.7, 11.2 when we release 19.1).

@fichtner fichtner reopened this Dec 30, 2018
@nanosonde
Copy link
Author

Unfortunately, I am not using OPNsense anymore as it was chosen to use another firewall solution.
So I am not following this topic anymore, sorry!

@karl047
Copy link

karl047 commented Jan 11, 2019

@fichtner : Thank you very much for ReOpening this Ticket.

I have to say firstly, that I have IPv6 disabled on my configuration at the point as I created the Bridge Interface, I mean no assigned static IPv6 address or over Track Interface to WAN is configured on this Interface.

in comparison with the other Interfaces, the Bridge Interface gets no IPv6 Link-Local as it is created, therefore IPv6 on the Devices behind this Interface won’t work when a static IPv6 address is configured on this Interface, BUT, the Bridge Interface gets automatically an IPv6 Link-Local when its IPv6 address is over Track Interface configured !

The solution for that in pfs* forum a 5 years ago, from pendi : edit the file interfaces.inc ( /usr/local/etc/inc/ ), and what he wrote:

To fix this I added (copied) the following lines into interfaces.inc to the function "interface_bridge_configure" just before the line "if (isset($bridge['enablestp'])) {":

/* Create link local address for bridges */
$mac = get_interface_mac($bridge['bridgeif']);
$v6address = generate_ipv6_from_mac($mac);
mwexec("/sbin/ifconfig {$bridge['bridgeif']} inet6 {$v6address}");

I had to make a reboot after editing that file and it works perfectly over about 10 months without any problem, but I have to edit it after every Update, but as I said: it works perfectly, and the Bridge Interface becomes an assigned IPv6 Link-Local.

I hope it will help.

@fichtner fichtner self-assigned this Apr 25, 2019
@fichtner fichtner added feature Adding new functionality and removed support Community support labels Apr 25, 2019
@fichtner fichtner added this to the 19.7 milestone Apr 25, 2019
@fichtner fichtner changed the title No IPv6 link local address assigned to bridge interface interfaces: optionally support "auto_linklocal" in bridges Apr 25, 2019
@fichtner
Copy link
Member

fichtner commented Apr 25, 2019

Sorry this took so long. From the amount of reports and the little work required here but still nobody doing the integration work in 3 years one could argue that the configuration is rather exotic and not relevant most of the time. FWIW, now you can optionally enable link-local addresses for each bridge configuration.

@karl047
Copy link

karl047 commented Apr 25, 2019 via email

fichtner added a commit that referenced this issue Apr 29, 2019
EugenMayer pushed a commit to KontextWork/opnsense_core that referenced this issue Jul 22, 2019
EugenMayer pushed a commit to KontextWork/opnsense_core that referenced this issue Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

No branches or pull requests

3 participants