Community discussions

MikroTik App
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

IPv6 distribution within the LAN

Wed Oct 16, 2024 5:10 am

I have a working IPv6 configuration to my ISP. It gets a /64 prefix via DHCPv6 and assigns itself an address from that pool.

WiFi clients can then connect to that hAP ax³ and get an IPv6 address within that pool. These clients then get successful results when visiting the usual IPv6 test sites.

My problem is, none of the wired clients are able to do the same thing, not even the CRS328 connected directly to that router:

Image

The "client" in that diagram is a macOS machine with both wired and wireless interfaces. It gets a publicly-routable IPv6 on its WiFi interface, but on its Ethernet link it gets only link-local addresses. When I went digging to find out why, I found that the CRS328 isn't getting a routable IPv6 address, either.

I can manually assign both of these devices IPv6 addresses from the PD pool my ISP gave me, and it does work, but I thought IPv6 was supposed to distribute addresses from that pool automatically via ND. It's important to me that it do this because my ISP doesn't guarantee that these prefixes are permanently assigned. I've seen it change at least once, and I need that change to ripple through the LAN automatically when this happens.

I do have all ports along the diagram's path marked as "Trusted" and to allow flooding of unknown multicast, to allow the NDP messages through. IGMP snooping is enabled on all RouterOS devices, with the MLD version set to 2.

I tried looking at the docs and searching the web, but everything I found talks only about the border gateway router case. Nobody seems to want to talk about the next obvious steps, getting the switch(es) behind the router addressed, then the clients behind those switches.

The output of "/ipv6/export" on the CRS328 is empty unless you give "verbose" to give the default ND rules:

/ipv6 nd
set [ find default=yes ] advertise-dns=yes advertise-mac-address=yes disabled=no hop-limit=\
    unspecified interface=all managed-address-configuration=no mtu=unspecified \
    other-configuration=no ra-delay=3s ra-interval=3m20s-10m ra-lifetime=30m ra-preference=medium \
    reachable-time=unspecified retransmit-interval=unspecified
/ipv6 nd prefix default
set autonomous=yes preferred-lifetime=1w valid-lifetime=4w2d

I would have thought that would be enough to get an IPv6 address on the CRS328 from the ax³ at least. Doesn't the autonomous=yes bit tell the switch to send NDP messages and obey whatever stateless IPv6 config results?

I doubt the problem is with the hAP ax³ since if that were the case, why are WiFi clients working properly? The radios' interfaces are bridged together with the wired interfaces. There isn't anything clever going on with VLANs; it's a flat LAN.

All RouterOS devices are running 7.17beta2. I doubt this is a beta bug, and there is no report of it from others in the beta thread, but I will allow the possibility that this used to work and I simply didn't make a note of it. I believe a more likely explanation is that my sense that this used to work owes everything to the grace of dynamic routing. That is, on all prior tests from the Mac, I happened to have the WiFi interface as the default route to the Internet, so it worked. Hard to prove retroactively, though.
 
User avatar
Coughy
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Tue Apr 23, 2024 2:53 am
Location: Brisbane Au

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 5:44 am

i have similiar setup but a tplink switch instead but all mine work??
wifi and lan so not sure whats happening here m8
i just followed my isp directions like this then rebooted
Screenshot 2024-10-16 124328.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 8:11 am

i have similiar setup but a tplink switch instead but all mine work??

Are you telling me that your TPLink switch is getting a globally-routable IPv6 address from your gateway router, and that all of the wired-only clients behind it are, too?

i just followed my isp directions like this then rebooted

That's basically what my linked article says.
 
User avatar
Coughy
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Tue Apr 23, 2024 2:53 am
Location: Brisbane Au

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 11:24 am

i have similiar setup but a tplink switch instead but all mine work??

Are you telling me that your TPLink switch is getting a globally-routable IPv6 address from your gateway router, and that all of the wired-only clients behind it are, too?

i just followed my isp directions like this then rebooted

That's basically what my linked article says.
correct im saying all lan devices behind the tplink switch have a ipv6 address given but the switch itself doesn't have one that i can see it is old as im awaiting on my new switch to turn up
so the switch looks as tho it is just passing the ipv6 info on from the hapax3
my wifi devices do but thats from my hapax3 router tho
so looks like your switch isnt playing nice
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 5:01 pm

Progress: I just netinstalled the switch with 7.16.1 and suddenly the same client machine called out above is getting a globally-routable IPv6 address from the gateway.

Next steps:

  1. Find out why the CRS328 itself is still not getting one despite "/ipv6 nd prefix default autonomous=yes".
  2. Upgrade to 7.17beta2 again and see if that breaks it.
  3. Reapply the prior configuration piece-by-piece until it breaks again, then report here.
 
tdw
Forum Guru
Forum Guru
Posts: 2048
Joined: Sat May 05, 2018 11:55 am

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 6:44 pm

Some bridge settings broke multicast until very recent versions of 7.x which prevented IPv6 from working properly

The /ipv6 nd settings cover parameters for both hosts and routers, you should not be advertising anything on the switch as it is a host device not a router.

My settings for a device running 7.12.1 and a static address is:
/ipv6 address
add address=2a02:xxxx:xxxx:42::251 advertise=no interface=bridge
/ipv6 nd
set [ find default=yes ] disabled=yes
/ipv6 settings
set forward=no


Without a static address the device should still have a global dynamic address formed from the prefix advertised from the router and the EUI-64 address from the bridge MAC.
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 7:25 pm

Some bridge settings broke multicast until very recent versions of 7.x which prevented IPv6 from working properly

Well, it looks like they've broken it again. After rebuilding my configuration from text backups atop the 7.16.1 netinstall, the client continued to get its NDP messages, but then on upgrading to 7.17beta2 again, the client returned to having a link-local address only.

(Alas, the switch itself did not acquire an IPv6 address from the NDP pool advertised by the router at any time while it was running 7.16.1.)

There were changes from my switch's configuration from yesterday versus this morning post-netinstall, but that was mainly due to me choosing to accept defconf again. Keep in mind that even with these changes, the only thing that changed between this morning's "working" and "not-working" states were the upgrade to 7.17beta2. That tells me that those changes couldn't be responsible for the breakages, which is good, because none of them made any sense as the culprit. (e.g. I had ingress-filtering=no on a bunch of the bridge ports because I don't do VLANs here, but I chose to let it go back to defconf after the upgrade to minimize the number of pointless diffs relative to defconf.)

/ipv6 address add address=2a02:xxxx:xxxx:42::251 advertise=no interface=bridge

Right; that's the static IPv6 address I reported adding above, which did work. That would be fine if I could rely on knowing the PD being a permanent grant as long as I keep this ISP, but I can't. Experience tells me I it may be stable for months, but that merely means it's long enough for me to forget to check whether it's changed come Spring 2025 and everything breaks again because Comcast decided to give me a different prefix because $REASONS.

/ipv6 nd set [ find default=yes ] disabled=yes

Can I take from that advice that you believe the ND implementation in RouterOS is useful only for the device that owns the IPv6 prefix, as opposed to clients? That is, that RouterOS doesn't know how to acquire IPv6 addresses via NDP itself?

/ipv6 settings set forward=no

While I am properly treating the CRS328 as a switch and not a router, I don't see how that one could fix or break this.
 
User avatar
BrateloSlava
Member Candidate
Member Candidate
Posts: 201
Joined: Mon Aug 09, 2021 10:33 am
Location: Ukraine, Kharkiv

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 7:30 pm

Here is my current home configuration
Screenshot_Home.png

Router configuration:
# 2024-10-16 10:37:20 by RouterOS 7.17beta2
# software id = 
#
# model = C53UiG+5HPaxD2HPaxD
# serial number = 

/ipv6 dhcp-server option add code=23 name=DNS-bridge-local value="'fe80::d601:c3ff:fe5d:41ff''fe80::2ec8:1bff:fe9c:f72'"
/ipv6 dhcp-server option add code=24 name=search-domain value="0x04'home'0x04'arpa'0x00"
/ipv6 dhcp-server option sets add name=set-DHCPv6 options=DNS-bridge-local,search-domain

/ipv6 address add from-pool=ipv6-pool interface=bridge-LAN
/ipv6 dhcp-client add add-default-route=yes interface=ether1 pool-name=ipv6-pool pool-prefix-length=66 rapid-commit=no request=address,prefix use-interface-duid=yes use-peer-dns=no
/ipv6 dhcp-server add address-pool=ipv6-pool dhcp-option=DNS-bridge-local,search-domain disabled=yes interface=bridge-LAN lease-time=5m name=server-dhcpv6-lan rapid-commit=no

/ipv6 nd set [ find default=yes ] advertise-dns=no disabled=yes managed-address-configuration=yes other-configuration=yes
/ipv6 nd add dns=fe80::d601:c3ff:fe5d:41ff,fe80::2ec8:1bff:fe9c:f72 hop-limit=64 interface=bridge-LAN ra-interval=10s-20s ra-lifetime=5m
/ipv6 nd prefix default set preferred-lifetime=30s valid-lifetime=1m


Configuration of the rest of the Mikrotik devices:
# 2024-10-16 10:37:18 by RouterOS 7.17beta2
# software id = 
#
# model = RB750Gr3
# serial number = 

/ipv6 nd set [ find default=yes ] disabled=yes

# 2024-10-16 10:37:17 by RouterOS 7.17beta2
# software id =
#
# model = RBcAPGi-5acD2nD
# serial number =

/ipv6 nd set [ find default=yes ] disabled=yes

# 2024-10-16 10:37:11 by RouterOS 7.17beta2
# software id = 
#
# model = RBwAPGR-5HacD2HnD
# serial number = 

/ipv6 nd set [ find default=yes ] disabled=yes

WiFi on the router and wireless access points is managed via CAPsMAN.

Any user devices that are connected via cable or WiFi successfully obtain IPv6 addresses.
You do not have the required permissions to view the files attached to this post.
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 7:45 pm

Here is my current home configuration

Thanks for sharing!

I don't want to use DHCPv6 inside the LAN, but I did try applying your shorter RA lifetimes to the border router which owns the PD, and it didn't help.

I also tried disabling ND on the CRS328, per both your advice and @tdw, but that also did not help.
 
User avatar
BrateloSlava
Member Candidate
Member Candidate
Posts: 201
Joined: Mon Aug 09, 2021 10:33 am
Location: Ukraine, Kharkiv

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 8:04 pm

but that also did not help.
Strange situation.
I don't have CRS328 anywhere, but I have a place with CRS326. This switch does not have the IPv6 option enabled at all. And all clients that are connected via cable are successfully getting IPv6 addresses.
Screenshot_NS.png

# 2024-10-16 10:37:07 by RouterOS 7.16.1
# software id = 
#
# model = CCR1016-12G
# serial number = 

/ipv6 dhcp-server option add code=23 name=dns value="'fe80::c6ad:34ff:fec3:5a8a''fe80::c6ad:34ff:fec3:5a8a'"

/ipv6 settings set accept-router-advertisements=yes max-neighbor-entries=2048

/ipv6 address add from-pool=ipv6-pool interface=bridge1

/ipv6 dhcp-client add add-default-route=yes interface=ether1 pool-name=ipv6-pool pool-prefix-length=66 rapid-commit=no request=prefix use-interface-duid=yes use-peer-dns=no

/ipv6 dhcp-server add address-pool=ipv6-pool dhcp-option=dns interface=bridge1 lease-time=1h name=server-bridge1 rapid-commit=no

/ipv6 nd set [ find default=yes ] advertise-dns=no disabled=yes

/ipv6 nd add advertise-dns=no dns=fe80::c6ad:34ff:fec3:5a8a,fe80::c6ad:34ff:fec3:5a8a hop-limit=64 interface=bridge1 other-configuration=yes ra-interval=10s-20s ra-lifetime=5m

/ipv6 nd prefix default set preferred-lifetime=30s valid-lifetime=1m

===
# 2024-10-16 10:37:07 by RouterOS 7.16.1
# software id =
#
# model = CRS326-24G-2S+
# serial number =

/ipv6 settings set disable-ipv6=yes max-neighbor-entries=2048
You do not have the required permissions to view the files attached to this post.
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 8:19 pm

And all clients that are connected via cable are successfully getting IPv6 addresses.

Can't we chalk that up to DHCPv6 vs NDP/SLAAC?

DHCPv6 has a different role than DHCPv4. I'm running a DHCPv6 client on the border router purely in order to get a PD from my ISP, and I am not running a DHCPv6 server anywhere. I intend that everything inside the LAN be SLAAC.
 
tdw
Forum Guru
Forum Guru
Posts: 2048
Joined: Sat May 05, 2018 11:55 am

Re: IPv6 distribution within the LAN  [SOLVED]

Wed Oct 16, 2024 9:31 pm

/ipv6 nd set [ find default=yes ] disabled=yes
Can I take from that advice that you believe the ND implementation in RouterOS is useful only for the device that owns the IPv6 prefix, as opposed to clients? That is, that RouterOS doesn't know how to acquire IPv6 addresses via NDP itself?
Rather it has components relevent to both, having the router-specific ones enabled on a device which is a host doesn't make sense.

/ipv6 settings set forward=no
While I am properly treating the CRS328 as a switch and not a router, I don't see how that one could fix or break this.
Because of the default:
/ipv6 settings
set accept-router-advertisements=yes-if-forwarding-disabled


Without this the switch will not pick up the network prefix or default route.
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: IPv6 distribution within the LAN

Wed Oct 16, 2024 10:37 pm

/ipv6 settings set accept-router-advertisements=yes-if-forwarding-disabled

Aha! This leads me to one of the solutions I was seeking in my top post:

/ipv6/settings/set accept-router-advertisements=yes

Simpler and more direct for a near-defconf smart-switch config, don't you think?

And yes, it does finally get me a globally-routable IPv6 address from my delegated prefix on the switch.

Now if only I dare try that under 7.17beta2…
 
tdw
Forum Guru
Forum Guru
Posts: 2048
Joined: Sat May 05, 2018 11:55 am

Re: IPv6 distribution within the LAN

Thu Oct 17, 2024 4:48 pm

At the end of they day it's down to personal preference, as switches and APs are not doing any routing I prefer disabling that functionality with /ip settings set ip-forward=no and /ipv6 settings set forward=no.

With the IPv6 change the device becomes a host rather than a router - these roles have very specific meanings in IPv6, see the description and note https://www.rfc-editor.org/rfc/rfc8200.html#section-2, and the use of yes-if-forwarding-disabled in other parts of the default configuration handles them.

The typical use of /ipv6 settings set accept-router-advertisements=yes is a home router where host-like behaviour is required on the WAN interface to accept the advertisments from the ISP, it would be nice if Mikrotik made this setting available per-interface rather than globally.
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: IPv6 distribution within the LAN

Fri Oct 18, 2024 7:11 pm

Quick update: the switch is still getting a globally-routable IPv6 address under 7.17beta4 with my variant of @tdw's config fix applied, but it continues to show the NDP multicast regression issue despite a claimed fix in the Changelog. It looks like we'll have to wait for the third beta for a proper fix to this.
 
User avatar
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1663
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: IPv6 distribution within the LAN

Tue Nov 19, 2024 7:30 pm

All RouterOS devices are running 7.17beta2. I doubt this is a beta bug…

The NDP+routing misconfiguration identified by @tdw and marked as this thread's "solution" is only part of the solution. The rest did turn out to be a beta bug, fixed in 7.17beta5:

*) switch - updated dynamic switch rules when using HW bridge with IGMP snooping (224.0.0.0/24 and ff02::/16 destination addresses are forwarded and copied to CPU) (additional fixes);

I needed both solutions operating together to get the desired behavior.
 
User avatar
Coughy
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Tue Apr 23, 2024 2:53 am
Location: Brisbane Au

Re: IPv6 distribution within the LAN

Wed Nov 20, 2024 12:29 pm

great forum for fixing issues i had to do this as well from my isp now working

/ipv6/settings/set accept-router-advertisements=yes
/ipv6/dhcp-client/set 0 add-default-route=no
now i have working ipv6 on lan
thanks everyone

Who is online

Users browsing this forum: eltikpad and 51 guests