Reset IPv6 after gateway reboot.

If I reboot my Internet gateway (Rogers in Canada) my device doesn't automatically get IPv6 reconnected, I need to disable and enable the IPv6 DHCP client. Is there a setting that I can set to do that automatically? Here are my settings

/ipv6 export

2024-09-07 13:53:24 by RouterOS 7.15.3

software id = QGQN-CV9P

model = RB5009UG+S+

/ipv6 address
add address=::1 from-pool=rogers interface=bridge
/ipv6 dhcp-client
add interface=ether1 pool-name=rogers request=prefix use-peer-dns=no
/ipv6 dhcp-server
add address-pool=rogers interface=bridge name=ipv6-server
...
ipv6 nd
set [ find default=yes ] interface=bridge managed-address-configuration=yes other-configuration=yes
/ipv6 settings
set accept-router-advertisements=yes

Any ideas on this? It isn’t just a reboot. Today the gateway lost Internet for around one minute but IPv6 wasn’t restored until I used the same disable/enable trick.

Martin

Is there a switch in between or something? I’d expect that reboot of gateway would cause link down and up, and dhcp client should notice that and ask again. Also, what exactly happens? Is there old prefix hanging and you get different one when you disable and enable dhcp client?

Thanks for getting back to me. It is wired CAT 6 2.5 Gb between the gateway and the router, there is no switch in between. The prefix has stayed fixed since I configured my Mikrotek router 5 months ago.

When there’s reboot, does router see ethernet link going down and up again? Or is there anything in log at all?

I didn’t notice on reboot (I will check next time I have the 10 minutes or so t takes) The link between the gateway and router stays up when the gateway Internet goes down, the gateway IP reports that it can’t connect but sometime it appears there is overnight maintenance around 03:45 with lost connections and I do see IPv4 only messages like this nothing about IPv6. I do see the reset actions that I manually triggered later to get IPv6 back.

ether1 link down
dhcp-client on ether1 lost IP address 174.xx.xx.xx - lease stopped locally
ether1 link up (speed 2.5G, full duplex)
dhcp-client on ether1 got IP address 174.xx.xx.xx

just my 2 cents, you can use (ipv4) dhcp-client script to trigger your ipv6 connection upon link down/up

I reccomend you to use public IPv6 only on pppoe/eth1 interface. To do this you can use a private prefix /64 and do a masquerade like IPv4.
You can use wherever IPv6 from this website, if you want to change the prefix just press F5 https://simpledns.plus/private-ipv6
ie.:

/ipv6 dhcp-client
add add-default-route=yes interface=ISPInterface pool-name=pool_ipv6 rapid-commit=no request=prefix use-peer-dns=no
/ipv6 address
add advertise=no from-pool=pool_ipv6 interface=ISPInterface
add address=::de2c:6eff:feeb:c359 eui-64=yes from-pool=pool20 interface=YOURLAN
/ipv6 firewall nat
add action=masquerade chain=srcnat comment="Masquerade" out-interface-list=WAN src-address-list=LAN
/ipv6 nd
set [ find default=yes ] mtu=1280



For global ipv6 on link interface disable “add advertise”
Fort ipv6 private on lan interface enbale “add advertise” this is SLAAC (a light dhcp server for ipv6)

To clarify, what loses IPv6 connectivity: only the hosts connected to the Mikrotik router or both Mikrotik router and its hosts?

If it’s the former, what’s the use of DHCPv6 Server?

FYI RouterOS’s DHCPv6 Server cannot assigned addresses to individual hosts, it can only distribute prefixes to other downstream routers. The managed-address-configuration=yes option under /ipv6/nd is here to for the case where you need to indicate presence of an additional, more capable, DHCPv6 Server in the network.

It also seems to me that you’re missing /ipv6/nd for the WAN interface (ether1). Can you run /ipv6/export verbose?

Thanks I posted here because I am a beginner so can’t answer all your questions. I don’t know why I use the IPv6 server but I assume the router should have an address. I lose IPv6 to the Internet I didn’t check local IPv6 if that is what you mean. My quick test it to ping 2600:: when my Chromecast start failing

/ipv6/nd/print
Flags: X - disabled, I - invalid; * - default 
 0  * interface=bridge ra-interval=3m20s-10m ra-delay=3s mtu=unspecified reachable-time=unspecified retransmit-interval=unspecified ra-lifetime=30m ra-preference=medium 
      hop-limit=unspecified advertise-mac-address=yes advertise-dns=yes managed-address-configuration=yes other-configuration=yes dns="" pref64=""

It finally happened again (also now on 7.1.6) and nothing changed on the router since it was still attached to the gateway and the gateway IP was reporting it couldn’t connect. After less than a minute of no Internet, I checked the IPv6 client and it was reporting bound but IPv6 wasn’t working so I had to do my disable/enable hack to get it to work

Why do you have managed-address-configuration=yes, do you have a DHCPv6 server in the network that hands out addresses?

No, just took the IPv6 configuration from an Internet post here https://www.dslreports.com/forum/r33834450-Mikrotik-Rogers-and-IPV6 Do you suggest I use just the items in that last post? I don’t think it worked when I tried it before. For now I have just set that to no and I will see if that is enough.

If your only router is RouterOS and you don’t run any additional services elsewhere on the link, then you want managed-address-configuration=no (which is the default IIRC). That should be enough for hosts to obtain addresses via SLAAC.

This is the core of my IPv6 working config:


/ipv6 dhcp-client
add interface=ether1-gateway pool-name=global prefix-hint=::/60 request=prefix
/ipv6 address
add eui-64=yes from-pool=global interface=bridge
/ipv6 nd
set [ find default=yes ] disabled=yes
add interface=bridge ra-preference=high reachable-time=5m
add advertise-dns=no interface=ether1-gateway ra-lifetime=none ra-preference=low reachable-time=5m
/ipv6 settings
set accept-redirects=no accept-router-advertisements=yes

You may need to wait for some time before clients pick up changes.

Thanks I tried but didn’t have much luck on my first attempt so I have to try more later this week. My cable boxes need IPv6.

ping 2600::
PING 2600::(2600::) 56 data bytes
From 2607:..1 icmp_seq=1 Destination unreachable: No route
From 2607:..1 icmp_seq=2 Destination unreachable: No route
From 2607...1 icmp_seq=3 Destination unreachable: No route

Martin

What cable boxes (vendor?), what’s your internet and TV service providers? Did they provide instructions regarding setting up IPv6 with them? I see that it’s Rogers Canada.

Could you describe your network layout in more detail, is the gateway modem bridged into your LAN? It’s better to understood how the ISP expects hosts to obtain IPv6 addresses.

Rogers yes, same XiOne and Xi6 devices as Comcast. Bridge mode isn’t supported so no instructions are available but it is a very straight forward 2.5 Gb connection gateway to router. The boxes do work very well now I just need to get this reset issue worked out.

I will try your setup completely later this week, I don’t want to mess with it while working from home. I assume disabling my dhcp-server from ipv6 is the same as not having it.

Also note that in the config I posted I set up /ipv6/nd on the gateway interface in addition to the bridge: that should help RouterOS to discover default route. I say help, because the exact behavior of RouterOS’s IPv6 ND is not well documented.

Would be interesting to see and compare states of /ipv6/route when all works well vs all is broken.

Chances are that you don’t need it: DHCPv6 server on RouterOS can only (1) delegate prefixes to routers downstream and (2) distribute DHCPv6 options to hosts (that’s what you enable via other-configuration=yes). It cannot hand out addresses to hosts which I suspect you, understandably but mistakenly, believe it does. See https://help.mikrotik.com/docs/display/ROS/DHCP#DHCP-DHCPv6Server:

RouterOS DHCPv6 server can only delegate IPv6 prefixes, not addresses.

So I made the changes to (I think) mimic yours and while I had IPv6 as soon as I disconnected and reconnected the gateway I lost remote IPv6. In fact it was worse since resetting the IPv6 client no longer restored IPv6

You are definitely on to something with the routing table though. When I disconnected this route to my IPv6 dhcp_client is removed

DAg dst-address=::/0 routing-table=main gateway=fe80::—%ether1 immediate-gw=fe80::—8%ether1 distance=1 scope=30 target-scope=10

with your change it wasn’t being readded when tried to re-enable it.

I did add dhcp-client to the default route though and now I can disconnect my gateway and restore it so we will see how that works.