Community discussions

MikroTik App
 
stvr
just joined
Topic Author
Posts: 3
Joined: Tue Mar 10, 2015 9:31 am

DHCP static leases getting lost on reboot/power loss

Tue Mar 10, 2015 10:24 am

Greetings.

RB951G-2HnD with 6.27 firmware is getting lost its DHCP static leases setup every reboot or power loss.
DHCP->DHCP Config ->"Store Leases On Disk" parameter is set up to "immediately", but any static lease information provided persists only to next reboot.
I also tried to restore recent backup, but lease table got clean just after restore. It is critical for me to assign static IP to some devices, but I don't want to do it directly on clients, because of unification reasons, DHCP-TO-DNS script and so on.

This unit had got similar problems about year ago on this place and config with 5.21-25 onboard. That time it was cured by factory reset and re-setup from scratch. The problem is back shortly after 6.27 upgrade, but now I haven't option to reset because of complex settings and remote location of the device.

Is there any way to diagnose and fix this problem?

Thanks!
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: DHCP static leases getting lost on reboot/power loss

Tue Mar 10, 2015 3:19 pm

Are you noticing any other settings or files not being saved upon reboot? I'd suspect perhaps bad flash memory or storage. If a complete wipe and reinstall fixed, it's entirely possible things were written into different blocks in flash and bypassed the bad ones for a while.

You might find some indicators in System>Resources. Anything under Bad Blocks?
 
stvr
just joined
Topic Author
Posts: 3
Joined: Tue Mar 10, 2015 9:31 am

Re: DHCP static leases getting lost on reboot/power loss

Tue Mar 10, 2015 11:08 pm

System Resources (fourth section) follows:

Sector Writes Since Reboot: 9947
Total Sector Writes: 140007
Bad Blocks: 0.0%

And upper:
Free HDD Space: 110.4 MiB
Total HDD Size: 128 MiB

Integrated disk seems to be almost unused (by space). Sector writes seems high, but some other working devices under my control show about 100-120 th. without any troubles.

In case of storage damage, is there any way to force controller to relocate data into other physical disposition?

Can it be problem with dual DHCP-server configuration (I have one for office network, and other for guests on separate interface)?
 
User avatar
rmmccann
Member Candidate
Member Candidate
Posts: 182
Joined: Tue Sep 25, 2012 11:15 pm
Location: USA

Re: DHCP static leases getting lost on reboot/power loss

Wed Mar 11, 2015 3:46 pm

System Resources (fourth section) follows:

Sector Writes Since Reboot: 9947
Total Sector Writes: 140007
Bad Blocks: 0.0%

And upper:
Free HDD Space: 110.4 MiB
Total HDD Size: 128 MiB

Integrated disk seems to be almost unused (by space). Sector writes seems high, but some other working devices under my control show about 100-120 th. without any troubles.

In case of storage damage, is there any way to force controller to relocate data into other physical disposition?

Can it be problem with dual DHCP-server configuration (I have one for office network, and other for guests on separate interface)?
I don't know if MT has any tools for checking the disk and automatically relocating bad sectors, but considering the bad blocks count is 0% I wouldn't worry about that being the problem - was just a shot in the dark on my part.

I did test on 6.27 and leases survive a reboot for me when set to save:immediately. Sector writes are high because any changes to DHCP are being recorded right away. Perhaps trying the default 5min setting and see if leases persist after a reboot? Otherwise I'd create a supout and send to support.
 
stvr
just joined
Topic Author
Posts: 3
Joined: Tue Mar 10, 2015 9:31 am

Re: DHCP static leases getting lost on reboot/power loss

Thu Mar 12, 2015 12:08 am

I did test on 6.27 and leases survive a reboot for me when set to save:immediately. Sector writes are high because any changes to DHCP are being recorded right away. Perhaps trying the default 5min setting and see if leases persist after a reboot?.
Doesn't help. The lease table is bald as a knee after reboot.

My other devices (about 15, generally with same config structure) successfully survived 6.27 upgrade. No troubles for a week, all is ok. Except this one, which is going to be pain.

Anyway, thanks for hints. It is time to ping the support. :-)
 
User avatar
Doberman
newbie
Posts: 38
Joined: Sat Mar 03, 2018 10:17 pm

Re: DHCP static leases getting lost on reboot/power loss

Sat May 01, 2021 6:01 pm

Yesterday... exactly happen to me !!!
I have power failure from provider and after that ... all my devices got new dhcp address ... I need 3 hour to clean the mess.

Does anyone have any idea what's going on ?

Is this normal ... write sector ???

uptime: 1d7h8m50s
version: 6.48.2 (stable)
build-time: Apr/09/2021 10:17:26
factory-software: 6.41.3
free-memory: 467.4MiB
total-memory: 512.0MiB
cpu: ARMv7
cpu-count: 1
cpu-frequency: 800MHz
cpu-load: 15%
free-hdd-space: 244.0KiB
total-hdd-space: 16.0MiB
write-sect-since-reboot: 185515
write-sect-total: 81375822
bad-blocks: 0%
architecture-name: arm
board-name: CRS328-24P-4S+
platform: MikroTik
 
User avatar
Doberman
newbie
Posts: 38
Joined: Sat Mar 03, 2018 10:17 pm

Re: DHCP static leases getting lost on reboot/power loss

Thu May 06, 2021 2:04 am

no one ???
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP static leases getting lost on reboot/power loss

Thu May 06, 2021 2:09 am

Like all other electronics devices, power failure can cause data loss...
Actually, from 2007 to now, no one single device on my network (4000+ devices) has lost static leases.
Sometime (2-3 times on all, and different devices) lost all configuration :)) you are lucky...


Can happen.
 
tantalon
just joined
Posts: 1
Joined: Sat Nov 03, 2018 6:54 pm

Re: DHCP static leases getting lost on reboot/power loss

Thu Nov 04, 2021 10:29 am

no one ???
I am facing exactly the same issue.
Once I got a power failure, and since then, the MT is unable to keep static leases.
I am not talking about power cycling. I go thru system - reboot, and the leases are gone. Everything else works fine.
I tried updating to 6.49, and no dice.
Obviously this causes us quite a problem, since the devices connected are then unable to talk to each other (they lack the ability to set static IPs).

Is there a cure for this Alzheimer, or should I RMA this unit? (hAP ac lite (black one) )

or is there a script that re-enters the leases after boot?
thanks
 
tensorflow
just joined
Posts: 8
Joined: Mon Aug 16, 2021 8:01 pm

Re: DHCP static leases getting lost on reboot/power loss

Thu Nov 18, 2021 9:02 pm

I have a CRS312 and this issue is becoming a pain where I have more than 40 devices and whenever a reboot occurs, I have to spend couple hours to reassign all the Static IPs. Can someone from Mikrotik take a look at this very critical issue ? Tried updating to 6.49.1 but no dice. It so pathetic to see such a simple functionality not working properly.

Who is online

Users browsing this forum: Ahrefs [Bot], loloski and 75 guests