Community discussions

MikroTik App
 
R1CH
Forum Guru
Forum Guru
Topic Author
Posts: 1108
Joined: Sun Oct 01, 2006 11:44 pm

IPv4 mode for Winbox

Thu Nov 18, 2021 11:51 pm

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 :).
 
jonah1810
Member Candidate
Member Candidate
Posts: 102
Joined: Tue Jul 30, 2019 10:19 pm

Re: IPv4 mode for Winbox

Fri Nov 19, 2021 12:11 am

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?
 
User avatar
k6ccc
Forum Guru
Forum Guru
Posts: 1579
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: IPv4 mode for Winbox

Fri Nov 19, 2021 12:23 am

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.
 
R1CH
Forum Guru
Forum Guru
Topic Author
Posts: 1108
Joined: Sun Oct 01, 2006 11:44 pm

Re: IPv4 mode for Winbox

Fri Nov 19, 2021 2:13 am

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.

Give me my happy eyeballs!
 
User avatar
Znevna
Forum Guru
Forum Guru
Posts: 1352
Joined: Mon Sep 23, 2019 1:04 pm

Re: IPv4 mode for Winbox

Fri Nov 19, 2021 3:22 am

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.
 
mducharme
Trainer
Trainer
Posts: 1777
Joined: Tue Jul 19, 2016 6:45 pm
Location: Vancouver, BC, Canada

Re: IPv4 mode for Winbox

Fri Nov 19, 2021 4:18 am

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.
 
R1CH
Forum Guru
Forum Guru
Topic Author
Posts: 1108
Joined: Sun Oct 01, 2006 11:44 pm

Re: IPv4 mode for Winbox

Fri Nov 19, 2021 4:53 pm

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.
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.
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: IPv4 mode for Winbox

Fri Nov 19, 2021 9:35 pm

"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.
 
User avatar
Znevna
Forum Guru
Forum Guru
Posts: 1352
Joined: Mon Sep 23, 2019 1:04 pm

Re: IPv4 mode for Winbox

Fri Nov 19, 2021 10:29 pm

Submit a feature request.

Who is online

Users browsing this forum: anav, nescafe2002, sindy and 20 guests