Community discussions

MUM Europe 2020
 
User avatar
docmarius
Forum Guru
Forum Guru
Topic Author
Posts: 1220
Joined: Sat Nov 06, 2010 12:04 pm
Location: Timisoara, Romania
Contact:

Feature request: Time/date startup value in /system/clock

Sat Jun 28, 2014 11:27 am

Certificate verification will fail on system startup before NTP synchronization is available, because time/date is 1.01.1970 and certificates validity starts on a later date.
This is a problem if NTP server access is only available AFTER the secured connection is in place.

A parameter "startup-date" under /system/clock would be useful in this case, so date will to be set to a specified value on system startup and updated later via NTP.
Of course this could be done via a script, but that's not really nice.
Torturing CCR1009-7G-1C-1S+, RB450G, RB750GL, RB951G-2HnD, RB960PGS, RB260GSP, OmniTIK 5HnD and NetMetal 922UAGS-5HPacD + R11e-5HnD in my home network.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Feature request: Time/date startup value in /system/cloc

Sat Jun 28, 2014 12:45 pm

+1, but is better one RTC onboard...
I'm Italian, not English. Sorry for my imperfect grammar.
 
User avatar
docmarius
Forum Guru
Forum Guru
Topic Author
Posts: 1220
Joined: Sat Nov 06, 2010 12:04 pm
Location: Timisoara, Romania
Contact:

Re: Feature request: Time/date startup value in /system/cloc

Sun Jun 29, 2014 12:41 am

I agree with that, but... :lol:
A RTC usually implies a lithium cell battery. which will limit the temperature range for the router, since lithium cells are not stable and reliable above 60 deg. Celsius, tending to let out some magical smoke.
This is no problem in desktop installations, where the device stays cool. But in an rack with limited ventilation one can possibly expect temperatures above that limit.
Torturing CCR1009-7G-1C-1S+, RB450G, RB750GL, RB951G-2HnD, RB960PGS, RB260GSP, OmniTIK 5HnD and NetMetal 922UAGS-5HPacD + R11e-5HnD in my home network.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Feature request: Time/date startup value in /system/cloc

Sun Jun 29, 2014 12:50 am

Really not are need one 3 years clock without power, only one capacitor with maintain date and time for 10 minutes, or just for reboot...

And is better than start date/time with RouterOS build date and time.
For example, if the package are made 26/06/2014, is absurd to start the clock on 1970....

Or better, if the bios [firmware] are builded for example 25/05/2014 is absurd to start the RB with one previous date....
I'm Italian, not English. Sorry for my imperfect grammar.
 
roadracer96
Forum Veteran
Forum Veteran
Posts: 714
Joined: Tue Aug 25, 2009 12:01 am

Re: Feature request: Time/date startup value in /system/cloc

Sun Jun 29, 2014 3:16 am

Pretty sure you can set a script to run on boot can't you? Have it set the initial time to something close.

Rtc in the higher end models would be worth the extra 2 bucks IMHO. At least on higher end models.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Feature request: Time/date startup value in /system/cloc

Sun Jun 29, 2014 12:23 pm

>>>A RTC usually implies a lithium cell battery. which will limit the temperature range for the router, since lithium cells are not stable and reliable above 60 deg. Celsius, tending to let out some magical smoke.

Usually cetificates are installed on gateway, not on access point, RB1100, RB1200, CCR, CRS and all rack models must have one RTC,
the rack never go to 60°!!!

"We" do not need one perennial battery, but just if I reboot the device (without leave the power) the clock must still syncronized...
I'm Italian, not English. Sorry for my imperfect grammar.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Feature request: Time/date startup value in /system/cloc

Sun Jun 29, 2014 12:26 pm

>>>Pretty sure you can set a script to run on boot can't you? Have it set the initial time to something close.

Yes, at the startup you can read date/time of the routeros package and set the actual time to that...
:global npkdate value=[/system package get system value-name=build-time];
/system clock set date=[:pick $npkdate 0 [:find $npkdate " " -1] ];
/system clock set time=[:pick $npkdate ([:find $npkdate " " -1] + 1) [:len $npkdate] ];
or with more complex script you can set date & time to the last good syncronization with NTP...

Run each 60 minutes:
:if ([/system ntp client get value-name="status"] = "synchronized") do={
/file remove [find where name~"lastsync"];
/system clock print file="lastsync";
};
Run at boot:
:global lastsync value=[/file get [find where name="lastsync.txt"] value-name="creation-time"];
/system clock set date=[:pick $lastsync 0 [:find $lastsync " " -1] ];
/system clock set time=[:pick $lastsync ([:find $lastsync " " -1] + 1) [:len $lastsync] ];

BUT...

Really users community must find everytime one walktrought for each "miss" or "bug"?
I'm Italian, not English. Sorry for my imperfect grammar.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Feature request: Time/date startup value in /system/cloc

Thu Jul 03, 2014 4:28 pm

Is like someone on next RouterOS 6.16rc11 like my ideas...
*) time - on routerboards, current time is saved in configuration on reboot
and on clock adjustment, and is used to set initial time after reboot;
Last edited by rextended on Thu Jul 03, 2014 9:42 pm, edited 1 time in total.
I'm Italian, not English. Sorry for my imperfect grammar.
 
jarda
Forum Guru
Forum Guru
Posts: 7604
Joined: Mon Oct 22, 2012 4:46 pm

Re: Feature request: Time/date startup value in /system/cloc

Thu Jul 03, 2014 5:34 pm

Hooray. Hope it will be saved periodically in order to survive unexpected power outage.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Feature request: Time/date startup value in /system/cloc

Thu Jul 03, 2014 6:24 pm

Hooray. Hope it will be saved periodically in order to survive unexpected power outage.
is like is saved only on "reboot" command...
I'm Italian, not English. Sorry for my imperfect grammar.
 
jarda
Forum Guru
Forum Guru
Posts: 7604
Joined: Mon Oct 22, 2012 4:46 pm

Re: Feature request: Time/date startup value in /system/cloc

Thu Jul 03, 2014 6:36 pm

If so, it is not enough.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Feature request: Time/date startup value in /system/cloc

Thu Jul 03, 2014 9:43 pm

You can use my script... ;)
I'm Italian, not English. Sorry for my imperfect grammar.
 
jarda
Forum Guru
Forum Guru
Posts: 7604
Joined: Mon Oct 22, 2012 4:46 pm

Re: Feature request: Time/date startup value in /system/cloc

Thu Jul 03, 2014 10:01 pm

Thanks for the offer.
 
User avatar
docmarius
Forum Guru
Forum Guru
Topic Author
Posts: 1220
Joined: Sat Nov 06, 2010 12:04 pm
Location: Timisoara, Romania
Contact:

Re: Feature request: Time/date startup value in /system/cloc

Fri Jul 04, 2014 12:15 am

It is also saved "on clock adjust". Is a SNTP update considered a clock adjust?
Anyway, to solve certificate validity issues, it is enough.
Good job MT team!
Torturing CCR1009-7G-1C-1S+, RB450G, RB750GL, RB951G-2HnD, RB960PGS, RB260GSP, OmniTIK 5HnD and NetMetal 922UAGS-5HPacD + R11e-5HnD in my home network.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 2946
Joined: Tue Feb 25, 2014 12:49 pm
Location: Capalbio, Tuscany, Italy

Re: Feature request: Time/date startup value in /system/cloc

Fri Jul 04, 2014 1:50 am

yes, I edit my post because mt also add "and on clock adjustment" :D
I'm Italian, not English. Sorry for my imperfect grammar.

Who is online

Users browsing this forum: No registered users and 142 guests