Menu

Understanding Best Master Clock algorithm's fault model

Help
2013-03-24
2013-03-24
  • Abdullah Al-Nayeem

    Hi,

    I have very little knowledge about the best master clock algorithm of PTP (mostly what I could know from wikipedia). So, I decided to understand the operations and the results of the best master clock algorithm with some fault injection experiments.

    For the experiments, I used three PTP master (with-NTP) in three nodes and one PTP slave in the third node. I use the commands: i) sudo ./ptpd2 -G -C -D ii) sudo ./ptpd2 -g -C -D -F 1

    I run two experiments:
    1. When both masters are running, one of them (say, MASTER-1) is selected as the best master and other (say, MASTER-2) operates in the PASSIVE mode. I kill the best master process. After a while, the MASTER-2 becomes the best master. It is how I expected the algorithm to behave. But I notice that when I restart MASTER-1, MASTER-1 becomes the best master. There is a change in the best master. Is this what I am supposed to observe? Is there any reason why the best master is changed when the old best master joins?

    1. I decided to change the time of the best master node using "date" command. I notice that even though the new time is wrong in the best master node by several seconds, the other valid master nodes still operate in the passive mode and do not become the new best master. Doesn't this algorithm support the Byzantine faults?

    It'd be helpful if you could also tell me the current fault model of ptpd.

    Thanks in advance.

    Best,
    Nayeem

     
  • Jan Breuer

    Jan Breuer - 2013-03-24

    When both masters are running, one of them (say, MASTER-1) is selected as the best master and other (say, MASTER-2) operates in the PASSIVE mode. I kill the best master process. After a while, the MASTER-2 becomes the best master. It is how I expected the algorithm to behave. But I notice that when I restart MASTER-1, MASTER-1 becomes the best master. There is a change in the best master. Is this what I am supposed to observe? Is there any reason why the best master is changed when the old best master joins?

    It is in specification, so it is correct. MASTER-1 tells that it is better then MASTER-2 and Best Master Clock algorithm will choose the best clock. By default all parameters of your masters are the same. You didn't change the priority nor the clock class. Decision is based on clock identity which is based on interface MAC address (lower means better). This implies that in you configuration CLOCK with lower MAC address will allways become a master.

    I decided to change the time of the best master node using "date" command. I notice that even though the new time is wrong in the best master node by several seconds, the other valid master nodes still operate in the passive mode and do not become the new best master. > Doesn't this algorithm support the Byzantine faults?

    There is no fault model in PTPd. If your master says that it is the best one, everyone will beleive it. As I know there are some proposals using Master Groups but they are not in the specification.

     

Log in to post a comment.