Community discussions

MikroTik App
 
stevedb
just joined
Topic Author
Posts: 5
Joined: Tue Nov 14, 2023 1:48 pm

Boundary Clocks on CRS317

Wed Jan 22, 2025 1:58 am

Hi All,
Is it possible to configure the CRS317 to run boundary clocks on its ports without connecting a slave port to a GM clock?
I know the clock will be wrong and drift, I just want a freerunning GM clock.
Thanks
 
ConradPino
Member
Member
Posts: 455
Joined: Sat Jan 21, 2023 12:44 pm
Location: San Francisco Bay
Contact:

Re: Boundary Clocks on CRS317

Wed Jan 22, 2025 4:19 am

 
stevedb
just joined
Topic Author
Posts: 5
Joined: Tue Nov 14, 2023 1:48 pm

Re: Boundary Clocks on CRS317

Wed Jan 22, 2025 10:10 pm

Thanks ConradPino,
I have read the documentation and this is why I chose the CRS317 as a potentially suitable device.
I am interested to know if anyone has experience of operating the boundary clock functionality without having a slave port connected to a live Grandmaster.
Boundary clock support does not necessarily mean the boundary clocks will operate if the device has never seen a GM.
Thanks,
Steve
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13321
Joined: Thu Mar 03, 2016 10:23 pm

Re: Boundary Clocks on CRS317

Thu Jan 23, 2025 8:23 am

Boundary clocks are by definition only relays (smart because they include/add information about delay induced by device but nothing more) ... If there isn't an external GM device in your network, then you want your device to become GM. Then the only remaining question is what kind of timing source is enough for device to become GM.

BTW, there are two primary roles of IEEE-1588: providing absolute time and providing stable frequency ... even if you don't care about absolute time, switch without stabilized clock source can't provide stable frequency. And some slaves really need it (e.g. mobile network cell towers rely on IEEE1588 to transmit at exact and stable frequency ... if they don't transmit at exact and stable frequency, they can screw also other networks, operating in same frequency band).
And this, BTW, is the main reason for IEEE1588 being used instead of plain NTP.
 
stevedb
just joined
Topic Author
Posts: 5
Joined: Tue Nov 14, 2023 1:48 pm

Re: Boundary Clocks on CRS317

Thu Jan 23, 2025 11:06 am

Thanks mkx,
I do understand why you raise these points, and you are right to do so. But I am aware of the implications of my question.
Each boundary clock has it's own local oscillator, it is not just relaying time information.
They discipline their own oscillator from the upstream GM and generate new PTP messages based on their own disciplined clock to downstream slaves.
Boundary clocks will have holdover capabilities to handle temporary loss of GM connection.
So they can master time.
But can the CRS317 do this even if it has never seen a GM on it's slave port. -- fully accepting the consequences of phase alignment and frequency drift and jitter.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13321
Joined: Thu Mar 03, 2016 10:23 pm

Re: Boundary Clocks on CRS317

Thu Jan 23, 2025 4:10 pm

Boundary clocks will have holdover capabilities to handle temporary loss of GM connection.
So they can master time.

So the question is: can boundary clock (cold) boot without seeing GM clock? IMO by definition it can't, but some implementations might allow it.

Just like NTP server can't start serving without first synchronizing to higher stratum ... unless it's configured to use local clock ... which AFAIK not every NTP implementation can.
 
ConradPino
Member
Member
Posts: 455
Joined: Sat Jan 21, 2023 12:44 pm
Location: San Francisco Bay
Contact:

Re: Boundary Clocks on CRS317

Fri Jan 24, 2025 1:58 am

My PTP reading suggests any PTP enabled device coming online does peer discovery on enabled ports, and if discovered and depending on topology, boundary clocks are chosen if needed, and a grandmaster is found or elected as needed. Which devices become boundary clocks and grandmaster depend on priority1, priority2, profile, and/or domain values. The protocol fills required roles if enabled. I expect enabled CRS317 coming onlline may become grandmaster if none is present or current grandmaster loses an election.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13321
Joined: Thu Mar 03, 2016 10:23 pm

Re: Boundary Clocks on CRS317

Fri Jan 24, 2025 9:23 am

I expect enabled CRS317 coming onlline may become grandmaster if none is present or current grandmaster loses an election.

I'd expect that as well ... but I certainly hope that PtP implementation does check if device (which is about to become boundary clock) has a reliable and stable clock source. CRS317 certainly doesn't. Just the way NTP works (yes, for NTP there are implementations which allow you to use local undisciplined clock as time source, but ROS implementation doesn't AFAIK).

And the way I read description, difference between boundary clock and grand master clock is that boundary clock is typically done on routers (with multiple interfaces ... so that IEEE1588 frames are actually routed) while GM only serves as grand master on single interface. GM is required to have reliable clock and frequency source (e.g. cesium clock or GPS with PPS) while boundary clock will generally rely on external GM but will pass timing frames on all of its interfaces. Yes, boundary clock will win election of time source for certain subnet (because it'll typically have best time source) and in that subnet it will appear to be GM. But from actual performance point of view, it's not exactly the same as actual GM.
 
stevedb
just joined
Topic Author
Posts: 5
Joined: Tue Nov 14, 2023 1:48 pm

Re: Boundary Clocks on CRS317

Fri Jan 24, 2025 12:44 pm

Yes, the documentation shows setting up the ptp profile and assigning ports to it.
When assigning the ports their role is not explicitly defined, so they must just negotiate in the typical ptp way to find the winning GM, and the other ports on the profile become boundary clocks.
This is where I see it will present issue with my 'hope' of the boundary clock ports freerunning.
I have other switches which you can force the role of the ports and they can freerun their boundary clock ports .... but at a very different price point.
The only way I will know is if I try it, thanks for your input.
 
ConradPino
Member
Member
Posts: 455
Joined: Sat Jan 21, 2023 12:44 pm
Location: San Francisco Bay
Contact:

Re: Boundary Clocks on CRS317

Fri Jan 24, 2025 1:22 pm

Set priority1 and priority2 based upon what is known of device clock behavior to bias elections towards best known device clock.
 
stevedb
just joined
Topic Author
Posts: 5
Joined: Tue Nov 14, 2023 1:48 pm

Re: Boundary Clocks on CRS317  [SOLVED]

Thu Feb 13, 2025 12:15 am

Finally got my hands on one and it does indeed master time just fine without a slave port connected to a GM ... for my purposes.
Config to get this behaviour is nothing special, just as per the docs. It seems this is just what it does.
The boundary clock ports will conform appropriately if connected to an external GM, but if there is none, they become GM's themselves.
We had a few initial issues using a 25G SFP, which does work at 10Gbe on other switches, but the CRS kept indicating it was losing link. Might have been unfair expecting a SFP28 to work in a SFP+ host. But swapping that out for a dedicated 10G SFP sorted it and my PTP slaves are happy with their freewheeling CRS317 port GMs.
We've got more testing to do but so far so good. I'd like to have more control over the PTP profile but for a sub £500 switch ... I'm very happy!