My ISP recently enabled IPv6 and now I’m finally joining the modern internet!
Unfortunately Winbox seems to prefer IPv6 addresses when connecting to a multi-homed DNS name, and several of the routers I have saved in my Winbox do not accept connections on IPv6. There is no fallback to IPv4, meaning I have to look up the address manually and copy paste it each time. It would be nice if there was way to control which protocol is used when connecting. It would also be nice if the Mikrotik dynamic DNS service didn’t register an IPv6 address that isn’t valid (expired pool) but that’s another topic .
DNS confuses me most of the time and maybe I’m not understanding quite what you are doing here. But would it not be routeros/dns-server that does the name resolution and not winbox?
Making sure I understand what you are doing. Confirm you are talking about pointing WinBox to a router that you are reaching via the Internet via a domain name. Easiest solution might be to save the router as an IPv4 rather than the domain name - i.e. 142.250.68.46 as opposed to Google.com. Obviously that only works if the domain has a static IP address.
Yeah that’s an option, but unfortunately these are dynamic IPs so I’m using the build in Cloud DNS names. Unfortunately the Mikrotik Cloud DNS registers the IPv6 address even if it’s in an error state, so there’s no way to easily connect to the IPv4 address returned by the name.
IP Cloud DDNS does not register fake IPv6 addresses, the IPv6 packet reached the IP Cloud Servers at some point.
So that router had working IPv6. If it doesn’t now, that’s another issue.
And as stated in numerous places it only requires a Disable / Enable of IP Cloud DDNS.
Disable sends a clear records to the server, and enable will only register the current working IP.
It might be better if Winbox could support “happy eyeballs” in cases where the DNS successfully resolves to both IPv4 and IPv6 addresses. I’m not sure how difficult that would be, though.
The router was moved from a site with IPv4+IPv6 connectivity to one with only IPv4, I would not expect the IPv6 record to remain there indefinitely if there is no IPv6 connectivity but if it really requires a packet then that’s probably what happened. Either way, incidental to the topic - I want happy eyeballs or a way to force the protocol.
“Happy eyeballs” is connecting to both IPv4 and IPv6 in parallel and using whatever succeeds first, which is not really necessary here, it would be enough to simply try all addresses one by one. WinBox already uses modern getaddrinfo() api, which returns all addresses a hostname resolves to, ordered by system’s preferences (it’s a good thing, it’s what prefers IPv6 on systems with IPv6 connectivity and ignores it on others without).
So the only change required is extra “for” loop to go through all returned addresses, instead of using just the first one. Simple change and would work for most cases. But since WinBox is professional tool, it could be helpful to have an option to force used address family. A global one would be probably enough (in menu, with choice between auto/IPv4-only/IPv6-only), which would then be passed as parameter to getaddrinfo(), so again very simple change.