Time Synchronization

Time Synchronization
News & Tutorials from Meinberg
  • PTP / IEEE 1588
  • NTP
  • Configuration Guidelines
  • Industry Applications
  • Security
Home » IEEE 1588 » Hands-on tutorial on PTPv2

Hands-on tutorial on PTPv2

August 15, 2014 by Andreja Jarc 14 Comments

By Andreja Jarc.

At this time I will grant you a short summer break from all the theory 🙂 and we will do some hands-on refreshment instead! Let’s check if PTP messages between a GM (Grandmaster) and a slave clock both configured with the Default profile are transferred smoothly.

For this purpose attach a laptop with a Wireshark software in a test bed with a GM and a PTP slave as suggested in Figure 1. For those who are not yet familiar: Wireshark is a user-friendly network protocol analyzing tool and free downloadable.

PTP hands-on setup

Figure 1: Hands-on setup to prove compatibility of the IEEE 1588 Default Profile configuration of a master and a slave clock.

In Wireshark go to the “Capture menu -> Interfaces” and select the laptop network port attached to the test setup. The network interface listens to all network protocols coming in and out including PTP. In the filter area (see Figure 2) type “ptp” and the data packages displayed will be limited to PTP messages only.

Start a new live capture by clicking “Start” in the Capture menu. After a while stop the running session with a Stop button (the forth icon in the second row). Now you are able to visualize PTP timing packages in a closer detail (Figure 2).

Wireshark showing a successful transfer of PTP messages

Figure 2: A print screen in Wireshark v1.8.6. showing a successful transfer of PTP messages between a Grandmaster and a slave in the multicast mode.

What we see in the main screen marked yellow is a two-step PTP message sequence between a master and a slave. The first message is called a Sync Message sent from a GM to a multicast IP address (check the Destination column). A Follow_Up Message which carries an accurate time stamp of the Sync Message departure time follows from the GM in a two-step operation. Next a Delay_Req Message is sent by a slave clock to the GM. The GM returns a Delay_Resp Message with an accurate time stamp of the Delay_Req Message arrival back to the slave.

See also  BMCA deep dive: part 1

The slave has now all significant t1-t4 time stamps to adjust its own time. One PTP package exchange between a master and slave is by this completed. If you acquired an appetite to learn more about the theory on PTP while trying out this hands-on then check our previous blog posts on IEEE 1588.

I hope you enjoyed today’s session, I will be glad to hear your feedback and discuss questions/comments…

For more information visit our website at www.meinbergglobal.com.

I wish you a nice holiday and am eager to welcome you back to our next on-line tutorials. Cheers!

  • share 
  • share  
  • share 

Related posts:

  1. Leap Second Test
  2. The Art of Negotiation, the PTP Way
  3. Using SNMP to Manage Network Time Servers
  4. Hybrid Mode PTP: Mixed Multicast and Unicast
Previous Post - PTPv2 Configuration over a Web Interface
Next Post - Time Synchronization Requirement for Synchrophasers

Filed Under: Configuration Guidelines, IEEE 1588

Comments

  1. Dave says

    April 19, 2016 at 7:22 pm

    I have wireshark installed on my laptop. I am capturing packets. I have selected ptp in the filter area. I am not coming up with any packets. Why is that? I am new to Wire Shark and want to capture packets from laptop to the universal server that syncs time for the www.

    Reply
    • Andreja Jarc says

      April 29, 2016 at 11:10 am

      Hello Dave,

      there can be many reasons why Wireshark shows no PTP messages.

      What is communication mode you are using: unicast, multicast? Do you use a switch between master and slave? Does the switch permit multicast messages?

      It may lay also on older version of the Wireshark.

      I recommend step by step troubleshooting. First attach your laptop directly to the master device, configure multicast messaging and check with Wireshark. Then try out unicast. Additionally add a slave to your setup. I hope this helps.

      Regards,
      Andreja

      Reply
  2. Ankush Chavhan says

    July 17, 2019 at 6:10 am

    Hi,
    I have currently developed ptp slave hardware, and I want test it for all possible ptp frames. Where can I get sample frames of all protocols.

    Reply
    • Andreja Jarc says

      July 18, 2019 at 6:56 am

      Hello Ankush,
      one way to test a PTP slave is to run Meinberg simulation software which can simulate multiple grandmasters, different PTP profiles, various message rates, delay mechanisms, etc.
      You can run a demo version first to see if it suits your requirements. Please check details:
      https://www.meinbergglobal.com/english/products/mps_v2.htm

      If you have a packet buster for PTP you can test that as well.

      Reply
  3. Brian A. Seklecki says

    November 20, 2019 at 12:16 pm

    In Layer3 mode, does the PTP GrandMaster on Meinberg appliance transmit IP multicast packets with a TTL set to 32?

    Reply
    • Andreja Jarc says

      November 21, 2019 at 1:24 pm

      Hello Brian,
      by default Meinberg sets the TTL to 5.

      However, the TTL value is configurable via a web interface.
      Therefore you can configure a TTL value to 32 if you prefer.

      Reply
  4. Hariharan Gandhi says

    November 9, 2020 at 11:22 am

    HI,After knowing the time stamps of all 4 packets whether the clock of slave is adjusted on its own or we have to adjust it

    Reply
    • Douglas Arnold says

      January 6, 2021 at 8:45 pm

      As long as the slave clock that you use in your test set up is a finished implementation of PTP, then it should adjust its own time. This tutorial was to show you how to watch the message exchanges using wireshark.

      Reply
  5. Hariharan Gandhi says

    November 9, 2020 at 11:26 am

    I am Trying ptp between two fpga’s of different clock frequencies

    Reply
    • Douglas Arnold says

      January 6, 2021 at 8:50 pm

      Two PTP instances can have different clock frequencies and still work together as long as they are both able to create timestamps based on the SI second.

      Reply
  6. Jaiz C K says

    January 14, 2021 at 2:27 pm

    Very informative tutorial. Kindly clarify my query. I have a requirement to find out the IP address of the ptp master through software (using C++ in Linux). For that I have the joined the multicast group 224.0.1.129 and listening to messages in port number 319. Using recvfrom socket call, I can obtain the IP Address of the sender to port 319. I am assuming that only master sends multicast to port 319. Is my assumption correct. Whether any of the slaves sends multicast message to port 319.

    Reply
    • Douglas Arnold says

      February 9, 2021 at 9:01 pm

      Port 319 are reserved for PTP event messages. Those are messages that get timestamped. If the PTP network is using End-to-end timing, in other words using delay requests and delay response messages, then PTP ports in the slave state will send delay requests via port 319.

      Reply
  7. German Trejo says

    October 30, 2021 at 7:46 pm

    This 4 way verification for PTP using wireshark should be the same for End to End, and Peer to Peer PTP Configuration, Am I understanding correctly?
    Thanks for this article, it’s very useful to probe PTP is running properly.

    Reply
    • Douglas Arnold says

      January 25, 2022 at 7:09 pm

      There is on critical difference between End to End and Peer to Peer PTP. Peer delay messages are sent in special type of Ethernet frame that is link local, and so not forwarded by Ethernet switches. You have to be on that link to see them.

      Reply

Discussion Area:

If you enjoyed this post, or have any questions left, feel free to leave a comment or question below.

Share Your Comments & Feedback Cancel reply

PTP Software

  • PTP Track HoundPTP / IEEE 1588 Protocol Analyzer

  • NTP / PTP Simulation Software
  • Meinberg Advertisement

    Categories

    • Authors
    • Configuration Guidelines
    • IEEE 1588
    • IEEE 1952
    • Industry Applications
    • NTP
    • Security

    External Links

  • NTP Security
    • Site Notice
    • Privacy Policy

    You may also like

    1. Leap Second Test
    2. The Art of Negotiation, the PTP Way
    3. Using SNMP to Manage Network Time Servers
    4. Hybrid Mode PTP: Mixed Multicast and Unicast

    © 2025 · Time Synchronization Blog

    MENU
    • PTP / IEEE 1588
    • NTP
    • Configuration Guidelines
    • Industry Applications
    • Security