Struggling to receive IPv6 prefix delegation from ISP

Hi all,

Apologies if I’m missing something obvious here, this is my first time with a Mikrotik device.

I’m using a hAP ax³ as my home router, and am plugging the WAN/ether1 port directly into my ISP box. I have no issues at all with receiving an IPv4 address over DHCP and then using it with NAT.

However, I’ve been unable to get an IPv6 prefix.

I know my ISP provides IPv6, as I have used it previously on their provided router. After contacting them, I have confirmed that they do provide IPv6 /48 prefixes over DHCPv6, and that it should “just work”.

I have used the IPv6 → DHCP Client menu to try and configure this. I am requesting a /48 prefix but it gets stuck on “searching…”. If I request just an address, I get assigned a single IPv6 address. If I request an address and a prefix, I get the searching problem.

This suggests to me that the connection is fine, but that I’ve made a mistake somewhere.

I have created an IPv6 pool (also /48), and I am explicitly asking for a /48 in DHCP client. I have tried fiddling with add default route, rapid commit and other settings in the DHCPv6 client, but have not had any luck getting further with the v6 prefix.

I have not adjusted any settings outside of the DHCP client and the pools menu.

If anyone has any suggestions, or needs some more information to get a good picture of my setup, please just ask.

We need to see the current IPv6 config: /ipv6/export

Ah, apologies. Thanks for highlighting this.

Configuration is as follows:

/ipv6/export 

# 2025-01-08 18:46:37 by RouterOS 7.16.2

# software id = soft_id

#

# model = C53UiG+5HPaxD2HPaxD

# serial number = my_serial

/ipv6 pool

add name=ipv6-pool prefix=::/0 prefix-length=48

/ipv6 dhcp-client

add add-default-route=yes comment=LITFIBRE-IP6 interface=ether1 pool-name=ipv6-pool pool-prefix-length=48 request=address,prefix use-interface-duid=yes use-peer-dns=no

/ipv6 firewall address-list

add address=::/128 comment="defconf: unspecified address" list=bad_ipv6

add address=::1/128 comment="defconf: lo" list=bad_ipv6

add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6

add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6

add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6

add address=100::/64 comment="defconf: discard only " list=bad_ipv6

add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6

add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6

add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6

/ipv6 firewall filter

add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked

add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid

add action=accept chain=input comment="defconf: accept ICMPv6" protocol=icmpv6

add action=accept chain=input comment="defconf: accept UDP traceroute" dst-port=33434-33534 protocol=udp

add action=accept chain=input comment="defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=udp src-address=fe80::/10

add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 protocol=udp

add action=accept chain=input comment="defconf: accept ipsec AH" protocol=ipsec-ah

add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=ipsec-esp

add action=accept chain=input comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec

add action=drop chain=input comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN

add action=accept chain=forward comment="defconf: accept established,related,untracked" connection-state=established,related,untracked

add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid

add action=drop chain=forward comment="defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6

add action=drop chain=forward comment="defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6

add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" hop-limit=equal:1 protocol=icmpv6

add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=icmpv6

add action=accept chain=forward comment="defconf: accept HIP" protocol=139

add action=accept chain=forward comment="defconf: accept IKE" dst-port=500,4500 protocol=udp

add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=ipsec-ah

add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=ipsec-esp

add action=accept chain=forward comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec

add action=drop chain=forward comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN

/ipv6 nd

set [ find default=yes ] managed-address-configuration=yes other-configuration=yes

Setting use-peer-dns=no to yes does not make a difference in the current configuration.

I don’t know if that would fix the problem, but:

  1. don’t create IPv6 pool manually. DHCPv6 client will create it automatically after it receives prefix.
  2. don’t use prefix-length=48 (either set it to 64 or omit it altogether), it doesn’t do what you probabky think it does. It’s about prefix length when they are handed out: either to DHCPv6 server if your router is set up to pass prefixes further) or when assigning ipv6 address using syntax address=::1 from-pool=.
    If you want to indicate desired prefix size to upstream DHCPv6 server, you can set prefix-hint=::/48 property of DHCPv6 client (but it’s a hint and upstream DHCPv6 server is likely to ignore it).
    It could be that your ISP is handing out smaller (longer) prefixes than /48 (mine is giving /56, some are giving /60 and some brain-dead ISPs are giving /64) and since your setting says you’ll be using /48 prefixes, any received prefix smaller than /48 might be ignored by DHCPv6 client.

Also: setting add-default-route=yes is conceptually wrong, but it might work with some ISPs. What this option does is that it takes DHCPv6 server’s (link-local) address and uses it as upstream gateway in default IPv6 route. This works fine if DHVPv6 server is a router as well (either actually intended one or just happpens to support routing), but thr correct way would be to tisable this property and set /ipv6/settings/set accept-router-advertisements: yes (default is effectively “no” while ideally that would be enabled per interface).
But the setting, discussed in previous paragraph, doesn’t prevent your DHCPv6 client from obtaining prefix.

Thank you for your guidance.

I have gone ahead and deleted my manually created pool.

When trying to enable accept router advertisements, I get an error like so:

/ipv6/settings/set accept-router-advertisements: yes
expected end of command (line 1 column 20)

Additionally, the DHCPv6 client isn’t happy when I try to specify no pool, or a blank prefix. (When I set it to /64, it gets stuck in the “searching…” state again - my ISP has assured me they are assigning /48s in this case)

Is this an issue with WinBox, the router, or my understanding?

Sorry, it should be

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

If it doesn’t allow you to unset prefix-length, then set it to 64.

You can omit requesting address … it’s not always needed and some DHCP servers might have problems providing both in response to single request.

Are you using winbox4? I’m not closely following its development, but it might still have some teething problems here and there. So you can try using webfig (web UI) or CLI to verify that DHCPv6 client settings are indeed as intended.

The amended command worked to enable accept-router-advertisments.

I’m not actually entirely sure what version of winbox I’m running, but I am now using webfig instead and have verified the settings match expectations.

I have removed the request for a single address, but am still not being allocated a prefix.

add action=accept chain=input comment="defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=udp src-address=fe80::/10

The src-address=fe80::/10 may be the culprit. Either remove it or replace with in-interface=ether1 instead.

Please post the update config after you make changes, just to make sure.

Thank you for the suggestion.

I made the requested change, but it does not appear to have had any impact on the IPv6 delegation.

New configuration:

/ipv6 dhcp-client
add comment=LITFIBRE-IP6 interface=ether1 pool-name=ipv6-pool \
    request=prefix
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=\
    bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=\
    bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=\
    bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=\
    bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" \
    connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" \
    connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMPv6" \
    protocol=icmpv6
add action=accept chain=input comment=\
    "defconf: accept UDP traceroute" dst-port=33434-33534 \
    protocol=udp
add action=accept chain=input comment=\
    "defconf: accept DHCPv6-Client prefix delegation." dst-port=\
    546 in-interface=ether1 protocol=udp
add action=accept chain=input comment="defconf: accept IKE" \
    dst-port=500,4500 protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" \
    protocol=ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" \
    protocol=ipsec-esp
add action=accept chain=input comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=\
    in,ipsec
add action=drop chain=input comment=\
    "defconf: drop everything else not coming from LAN" \
    in-interface-list=!LAN
add action=accept chain=forward comment=\
    "defconf: accept established,related,untracked" \
    connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop packets with bad src ipv6" src-address-list=\
    bad_ipv6
add action=drop chain=forward comment=\
    "defconf: drop packets with bad dst ipv6" dst-address-list=\
    bad_ipv6
add action=drop chain=forward comment=\
    "defconf: rfc4890 drop hop-limit=1" hop-limit=equal:1 \
    protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" \
    protocol=icmpv6
add action=accept chain=forward comment="defconf: accept HIP" \
    protocol=139
add action=accept chain=forward comment="defconf: accept IKE" \
    dst-port=500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" \
    protocol=ipsec-ah
add action=accept chain=forward comment=\
    "defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=forward comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=\
    in,ipsec
add action=drop chain=forward comment=\
    "defconf: drop everything else not coming from LAN" \
    in-interface-list=!LAN
/ipv6 nd
set [ find default=yes ] managed-address-configuration=yes \
    other-configuration=yes
/ipv6 settings
set accept-router-advertisements=yes

Just to make sure: your WAN is connected to ether1?

Yeah, my WAN is on ether1 and IPv4 is working fine over it.

I’ve tried briefly toggling my IPv6 firewall down and back up and was unable to receive a prefix when it was down, suggesting that it might not be a firewall problem.

Is it feasible to disable all IPv6 firewall rules, reboot the router and then attach the output of /ipv6/pool/print?

After disabling the rules, rebooting and running that command I get a completely blank output.

In that case I would try to sniff ICMPv6 and DHCPv6 traffic on ether1. That does not seem right.

I’m getting no IPv6 connectivity at all (I can’t even acquire a prefix, after my recent firewall update mentioned in this thread).

But if I disable that rule, I can acquire a single IPv6 address again.

I have attached a dump that I believe covers my IPv6 traffic on ether1.

During the capture, I requested a prefix, changed my firewall rules, and then requested a single IP.

The attached file is a pcap
ipv6debug.txt (772 Bytes)
One of the IPv6 addresses in the pcap is registered to my ISP.

Give the following a TRY <>

First: Disable your ipv6 Firewall
Second: Delete ALL your ipv6 configuration because you will start from scratch
Third: Once you have completed the 2 steps above THEN in Winbox Terminal issue the following directives - each one independently

1st directive:

/ipv6 dhcp-client
add add-default-route=yes comment=“delegate ISP-assigned prefix” interface=
ether1 pool-name=isp-ipv6 prefix-hint=::/48 request=address,prefix
use-peer-dns=no

2nd directive:

/ipv6 nd
set [ find default=yes ] dns=2606:4700:4700::1111,2606:4700:4700::1001
interface=ether1 mtu=1500 ra-lifetime=none reachable-time=5m

3rd directive:

/ipv6 nd prefix default
set preferred-lifetime=4h valid-lifetime=4h

4th directive:

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

NOW REBOOT your Router

If you ipv6 confiuration is now working TURN ON the ipv6 Firewall

Hi mozerd

Thanks for the suggestion. I have given it a shot but unfortunately I still don’t get IPv6 connectivity.

I have had no errors, the configuration seems to apply fine but after a reboot it gets stuck in the “searching…” state again.

I also noticed that my DoH server may be causing a problem, but after disabling it I found no difference either.

If anyone suspects the issue is something that could be resolved faster with information from my ISP, I have a pretty quick line of communication with them and could request information. The only thing they haven’t been able to support with was the router, as it isn’t provided by them - which is fair enough.

@saluki
Pleasse reboot your ISP device … best to turn the power OFF wait for 5 minutes then turn the power back on again …

Also please confrim that your ISP device is in BRIDGE mode and not in gateway mode PRIOR to doing the step above …

My ISP device is a cryptic box on the wall that I have no direct access to. I can’t directly request or check what mode it is in.

I have just tried powering it off for a few minutes and then bringing it back up - but no luck still.

I have a separate router they provided, which is switched off and not involved in my current network architecture. It used to act as the gateway, so I assume the box is running in bridge mode. I could get in touch with my ISP to ask them to verify this, although I’m not sure if my IPv4 internet would be working if it was in gateway mode.

Is the cryptic box getting a ipv6 address?

I suspect that there is a ipv6 mismatch happening between your cryptic box and your Tik Router … best that you have your ISP check their DHCPv6 server to view how YOUR Tik ipv6 solicitation is taking place …

Very interesting BTW :slight_smile: