Menu

PTP using multiple interfaces

Help
2007-08-10
2012-11-23
  • Patrick Vestjens

    Hello,

    I'm trying to use PTPd in a star-shaped network consisting of one master and two slaves. Each slave is connected to the master via ethernet over usb. So, the master has two interfaces (usb0 and usb1) to communicate with the slaves.

    Synchronizing just one slave with the master clock works as a charm. However, synchronizing both slaves with the master clock is a bit harder. Multi-casting a message over multiple interfaces is not supported when using sockets. So, alternatively I thought it might be possible to run two ptpd instances on the master, each synchronizing the master's clock (which is also master in the algorithm and will therefore not be changed) with the clocks of the two slaves.

    Unfortunately, I cannot keep the two ptpd instances apart. One instance always becomes the slave of the other. I tried the following:

    -b option: specifying different network interfaces (usb0 and usb1)
    -u option: using unicast specifying the (different) slave IP addresses (10.0.30.2 and 10.0.31.2)
    -n option: specifying different PTP subdomain names (first and second)

    I'd except that any of the above options would keep the two instances of ptpd apart. However, none of them does. When starting the two instances on the master, one of them instantly becomes the slave of the other. As a result, one of the actual slaves does not have a master and will therefore not be synchronized.

    Am I missing something?

    With best regards, Patrick.

     
    • kendall

      kendall - 2007-08-18

      For starters, technically IEEE 1588 is not defined for USB, only ethernet. However, I think PTPd should work on most IP networks. PTPd is always multi-casting. The -u option makes it uni-cast to one address in addition to multi-casting. The -b option will probably not keep two instances of PTPd separate either.

      The -n option should keep two instances of PTPd separate. Apparently, that is not working. Sorry, I'll fix that. Once that is fixed, then your set-up with each server on a different PTP sub-domain should work.

       
    • Patrick Vestjens

      > For starters, technically IEEE 1588 is not defined for USB, only ethernet.

      I wasn't sure about that in anticipation of a copy of the IEEE 1588 standard.

      > However, I think PTPd should work on most IP networks.

      As long as it does not use ethernet-specific primitives I'd expect it to. However, media specific limitations such as the peer-to-peer communication in a USB-based IP network might limit its usability.

      > The -u option makes it uni-cast to one address in addition to multi-casting.

      Okay. So, uni-cast does not replace but rather complements multi-cast.

      > The -b option will probably not keep two instances of PTPd separate either.

      Why not? Is this because they'll still find each other via the loopback interface?

      > The -n option should keep two instances of PTPd separate. Apparently, that is not working. Sorry, I'll fix that. Once that is fixed, then your set-up with each server on a different PTP sub-domain should work.

      Thanks for all of your efforts. If you need any help in testing, please let me know.

      With best regards, Patrick.

       

Log in to post a comment.