Menu

BMC algorithm in PTP

Help
Jack Jones
2017-04-27
2017-04-27
  • Jack Jones

    Jack Jones - 2017-04-27

    Hi everybody.

    I have a question considering BMC algorithm in PTP. For example, if I have 3 nodes, in normal case, one node is grandmaster to other 2 nodes (grandmaster is connected with second node and second node is connected with third node) . But if I restart grandmaster node, is it possible that both of other two nodes become master? If it is possible, can you please explain how? Shouldn't BMC algorithm choose better from those two as master?

    Thanks in advance

     

    Last edit: Jack Jones 2017-04-27
  • Wojciech Owczarek

    Hi,

    The truth is that it doesn't really matter, because the slaves also run the BMCA, so even if two masters become active, slaves will select only one anyway. When the active master goes away, the other two will wait n * announce interval (configurable) and will consider themselves best and will start transmitting, possibly both. But soon after the "worse" of the two receives the first announce message from the "better" one, it will stop being master. Actually not as soon as, but soon.How long this transition period will take, depends on the implementation, but the standard specifies a qualification window: you do not even consider another master until it has been announcing for a certain period of time (can't remember, 2 * announe interval I think).

    What you describe as a "normal" case is not really what you will see in most deployments. The state machine is different depending on the clock class (either configurable or depends on your clock source and its state). Only a clock with clock class >= 128 will become slave to other masters when it is not the best clock. A clock with a better clock class will never become a slave when not best, it will transition into PASSIVE state where it does not transmit anything. You mostly see master/slave transitions in research and testing. Most commercial time servers can either be: master/passive, or slave-only, and will not run the way you described.

    PTP has multiple mechanisms to prevent transient states and flapping.

    Thanks,
    Wojciech

     

Log in to post a comment.