Community discussions

MikroTik App
 
mmorelie
just joined
Topic Author
Posts: 18
Joined: Thu Jul 28, 2016 4:04 pm

RBD52G-5HacD2HnD scripting and reset-configuration

Thu Sep 19, 2019 5:02 pm

Hi,

I try something that is working on a RB2011 on a RBD52G-5HacD2HnD and is not working. The two devices run on ROuterOS 6.44.5 LTS

i have a default configuration where i download a config file with :
:tool fetch \$urlGetConf\
here is the test configuration :
while ([:len [/interface find]] < 5) do={}
/ip pool
add comment=factory name=factory-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=factory-dhcp disabled=no interface=ether5 name=factory
/ip address
add address=192.168.88.1/24 comment=factory interface=ether5 network=192.168.88.0
/ip dhcp-server network
add address=192.168.88.0/24 comment=factory
The command i use for changing the configuration to the newly downloaded
:system reset-configuration keep-users=yes skip-backup=yes run-after-reset=(\$serialNumber.\".rsc\)
When the router is up after the reboot nothing is working, in winbox i can see the router but it has no ip address and i can't log in to.

Anyone as the same problem ? I realy can't figure out what is going on.
 
mmorelie
just joined
Topic Author
Posts: 18
Joined: Thu Jul 28, 2016 4:04 pm

Re: RBD52G-5HacD2HnD scripting and reset-configuration

Fri Sep 20, 2019 3:08 pm

I have made some other tests.

I try RouterOS 6.43.16
RB2011 => OK
RB4011 => OK
RBD52G = NOK

Is there a limitation on th RBD52G for such things ?
 
mmorelie
just joined
Topic Author
Posts: 18
Joined: Thu Jul 28, 2016 4:04 pm

Re: RBD52G-5HacD2HnD scripting and reset-configuration

Fri Sep 20, 2019 4:09 pm

I think i know why it's not working.

After downloading the configuration file $serialNumber.rsc i do :
:system reset-configuration keep-users=yes skip-backup=yes run-after-reset=(\$serialNumber.\".rsc\")
On RB4011 and RB2011 the router restart and when i login if i do :
/file print
I can see the file $serialNumber.rsc

But on the RBD52G the file is not there so the run-after-reset can't work.

Any clue on why the file disappear ?
 
mmorelie
just joined
Topic Author
Posts: 18
Joined: Thu Jul 28, 2016 4:04 pm

Re: RBD52G-5HacD2HnD scripting and reset-configuration

Thu Sep 26, 2019 12:04 pm

Here is the solution :

RBD52G has spi flash memory, all files outside flash folder will be deleted during reboot, as they are saved in RAM.

So you need to store all files in flash/

Who is online

Users browsing this forum: Bing [Bot] and 19 guests