Community discussions

MikroTik App
 
dl1nux
newbie
Topic Author
Posts: 27
Joined: Tue Jan 03, 2017 11:45 am

Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Mon Jul 04, 2022 10:06 pm

Hi there, I am searching for days now how to solve my Problem. Without success, Maybe someone has an idea :-)

Central Router is a CRS125 with RouterOS 6.49.6 and there are several cAPs connected with CapsMan (all v 6.49.6).
I used to have a Windows Server 2016 in the last years as Domain Controller, fileserver and DHCP/DNS-Server.
For some reasons I decided to shutdown permanently the Windows Server.
DNS and DHCP moved to the MikroTik Router. All configured, all working well.

But since I shut down the Windows Server, my WiFi Weather Station reports WiFi problems. There are massive packet losses in the connection.
I've checked it by pinging the weatherstation from PC and from the Winbox. In this state, the Weatherstation cannot submit its data to a local WeeWX instance because of the bad connection
I thought it is maybe a WiFi Problem with my Cap Configuration or so, but it isn't.
When I stop the DHCP Server on the MikroTik device reactivate my Windows Server, the WiFi Weatherstation works 100 well all the time.
No packet losses, no WiFi Problems, nothing. All ok.
I turn off again Windows Server and activate DHCP on the MikroTik device, the problem comes back again.

When the WeatherStation boots, it connects to the cAP and all is working OK for some minutes. After about 4-5 minutes, the Problem begins again. Packet losses over and over.
Sometimes, without doing anything, it works again for 1-2 minutes, before breaking again.

This is very awful. I've checked with "DHCP Explorer" what Informations are sent through Windows Server DHCP and MikroTik DHCP:

DHCP Windows Server:
DHCP-Server-WinServer2016.PNG
DHCP MikroTik DHCP Server
DHCP-Server-MikroTik.PNG
I only see differences for DHCP renewal time and rebind time. It isn't mentioned with MikroTik DHCP. Could this be a Problem?
What is the difference of MikroTik an Windows DHCP that can cause sucha Problem.

By the way, the weatherstation cannot work with manual IP configuration. It only uses DHCP.
And this is the WeatherStation: DNT WeatherScreen Pro

Anyone has any ideas? Thanks in advance.
You do not have the required permissions to view the files attached to this post.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Mon Jul 04, 2022 11:17 pm

Are you sure this is the problem?

After a full backup, paste this on terminal:
/ip dhcp-server
set [find] lease-time=1d
/ip dhcp-server option
add code=58 name=Renewal-Time value=0x0000A8C0
add code=59 name=Rebinding-Time value=0x00012750
/ip dhcp-server network
set [find] dhcp-option=Renewal-Time,Rebinding-Time
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Tue Jul 05, 2022 12:29 pm

Another issue I have encountered with multiple home automation products was their sensitivity to DNS response contents. Mikrotik filters out some unsolicited items from the responses, and converts fqdns into lowercase. So try to exclude Mikrotik itself from the list of DNS servers sent to the client via DHCP.

I do realize the weatherstation doesn't respond to ping which should be unrelated to DNS stuff, however on those power consumption optimized devices the network stacks may behave unusually.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Tue Jul 05, 2022 2:17 pm

[...] converts fqdns into lowercase [...]
Uhhhhhhhhhhhhhhhhhh................................................................................... :shock:
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Tue Jul 05, 2022 4:26 pm

For the record, case conversion in DNS responses was fixed in v7 (I'm not saying you should rush to upgrade, as it's probably not it anyway).
 
dl1nux
newbie
Topic Author
Posts: 27
Joined: Tue Jan 03, 2017 11:45 am

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Tue Jul 05, 2022 10:01 pm

Are you sure this is the problem?

After a full backup, paste this on terminal:
/ip dhcp-server
set [find] lease-time=1d
/ip dhcp-server option
add code=58 name=Renewal-Time value=0x0000A8C0
add code=59 name=Rebinding-Time value=0x00012750
/ip dhcp-server network
set [find] dhcp-option=Renewal-Time,Rebinding-Time
Hi and thanks, i guess you're a MikroTik god :-)
I've added the DHCP Options as you told me to, rebootet the weatherstation and since then it runs perfectly. Now 1/2 hour without any problems.
I will watch again after 1 day (new lease time) and see whats happen. I hope it keeps stable.

I don't know why this weather station has this issue, all other clients are working fine with the standard DHCP Server on MikroTik.
But when I saw that it always happens after some minutes after it connects, I had the suspicion it had something to do with the missing DHCP options (rebind, renewal).
DHCP was the only change in the network in this time.

So thanks again. I will post again after 1 or 2 days about the status.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Tue Jul 05, 2022 10:29 pm

Is the same fix I haved used on the past for fix playstation network problems for some users...
And now is a default config for all my CPEs...
 
dl1nux
newbie
Topic Author
Posts: 27
Joined: Tue Jan 03, 2017 11:45 am

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Wed Jul 06, 2022 7:47 pm

Is the same fix I haved used on the past for fix playstation network problems for some users...
And now is a default config for all my CPEs...
Hi, I have bad news. The problem occured again after 12 hours and 5 minutes after I set the Options.
Thats when the "renewal time" is reached. DHCP Renewal time is set to 12 Hours. I think it has something to do with that.

Any more Ideas?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Wed Jul 06, 2022 7:53 pm

Yes, assign a static lease (convert dynamic by simply clicking on the button) and set the lease time to 100 years.
I don't think you will come back to this forum in 100 years to complain, I bet on this ...
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Wed Jul 06, 2022 8:13 pm

and set the lease time to 100 years.
:lol:
Really ?

To me, if it was a lease renewal problem it would occur in exactly 12 hours and not in 12 hours and 5 minutes...
But yes, assigning a static lease might be a solution ...
 
dl1nux
newbie
Topic Author
Posts: 27
Joined: Tue Jan 03, 2017 11:45 am

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Thu Jul 07, 2022 10:35 pm

Hi again,

static IP is not enough. I already worked with static IP via MikroTik (weather device doesn't support native static IP). Then I switched to dynamic IP and it happened also.
OK, then I will have to increase the renewal period. That's not perfect but will work I think.

Thanks again for all hints.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Thu Jul 07, 2022 10:40 pm

I say "assign a static lease (convert dynamic by simply clicking on the button)" etc.
not increase dhcp lease time on dhcp-server settings... ;)
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Thu Jul 07, 2022 10:44 pm

Static IP (as in "manually configured") is not the same as static lease (a reservation of IP address to be assigned via DHCP to a given client-id). What @rextended suggests is the latter - for a static lease, you can specify also other parameters, like the lease time, individually, differently from the common defaults. In fact you can even specify the address as a pool, so the address itself will remain dynamic, but the lease time of 100 years will only be used for lease to the weatherstation.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Thu Jul 07, 2022 11:02 pm

For the record, case conversion in DNS responses was fixed in v7 (I'm not saying you should rush to upgrade, as it's probably not it anyway).
I remember reading that tidbit but thought it was for some isolated functionality, is this the case for all DNS now............
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Fri Jul 08, 2022 2:27 am

@anav: It's OT here, I only added extra info because it was mentioned, in case someone finds it later. The problem was that ROSv6 ignored case used by client in query and returned lowercase hostname in response, while most or all other DNS servers kept the case. And some clients started to rely on what other servers did. So ROSv7 now does the same as others. In short, don't worry about it, everything is fine.
 
dl1nux
newbie
Topic Author
Posts: 27
Joined: Tue Jan 03, 2017 11:45 am

Re: Problems with DHCP from Mikrotik Device with WiFi WheatherStation

Sat Jul 09, 2022 1:16 pm

I say "assign a static lease (convert dynamic by simply clicking on the button)" etc.
not increase dhcp lease time on dhcp-server settings... ;)
Thanks, I misunderstood. I never tried static lease times. I now have set in the configuration for this device a fixes lease time of 365 days, this should ne enough.
Only by rising the renewal time didn't work. The lease time doesn't went up, it was still by 12 hours.
But the 365 days now work. Hope it stays ok :-)

Who is online

Users browsing this forum: No registered users and 66 guests