PTP - Precision Time Protocol

What is PTP?

The PTP (Precision Time Protocol) is a protocol used to synchronize clocks across a computer network with sub-microsecond accuracy.

What standard defines PTP?

PTP is defined by the IEEE 1588 standard. The first version, IEEE 1588-2002, is known as PTP v1.

What is the main use of PTP?

PTP is used in precise time coordination systems, such as industrial automation, telecommunications, power systems, and financial trading.

How does PTP achieve high accuracy?

PTP uses hardware timestamping and a master-slave hierarchy to minimize jitter and delay, achieving sub-microsecond synchronization.

What is the difference between PTP and NTP?

  • PTP offers much higher precision (sub-microsecond) compared to NTP (millisecond-level), making it suitable for time-critical applications.

What is a PTP master-slave?

  • The master clock provides the reference time, while slave clocks synchronize to it. This hierarchy ensures consistent time distribution.

Does PTP require special hardware?

For high accuracy, PTP benefits from hardware timestamping support in network interface cards (NICs) and switches.

What transport protocols does PTP use?

PTP typically uses UDP over IP networks, often on port 319 (event messages) and 320 (general messages).

Can PTP work over wireless communication?

While possible, wireless introduces variable latency and jitter, which can reduce synchronization accuracy.

What are the limitations of PTP v1?

PTP v1 lacks some features of later versions like profile support, improved fault tolerance, and better scalability.

  • In this section, you are going to learn

  • Terminology

  • Version Info

S.No

PTP Version

RFC / Standard

Core Idea / Contribution

Year

1

PTP v1

IEEE 1588-2002

Original version of PTP; introduced high-precision time sync using master-slave architecture.

2002

2

PTP v2

IEEE 1588-2008

Added support for profiles, improved accuracy, and new message types (Announce, Signaling).

2008

3

PTP v2.1

IEEE 1588-2019

Enhanced security, management, and terminology; backward-compatible with PTP v2.

2019

4

PTP MIB Support

RFC 8173

Defines SNMP MIBs for managing PTP devices.

2017

5

PTP over MPLS

RFC 8878

Describes transport of PTP messages over MPLS pseudowires.

2021

6

PTP YANG Models

RFC 8575

Specifies YANG data models for managing PTP clocks and devices.

2019

7

PTP Profile Use

RFC 7384

Guidelines for selecting and using PTP profiles in telecom networks.

2015

8

PTP in RTP

RFC 7273

Defines RTP Clock Source Signaling for PTP-based synchronization in media streams.

2014

9

Enterprise PTP

RFC 9760

Enterprise profile for PTP using IEEE 1588-2019; supports mixed multicast/unicast.

2025

  • Setup

  • Setup

Syn Message Packet

S.No

Protocol Packet

Description

Size(Bytes)

1

Sync Message

Sent by the master clock to initiate synchronization with slave clocks.

4464

Transport Header

UDP/IP header

28 (IPv4 + UDP)

PTP Header

Common PTP message header

34

Origin Timestamp

Time when Sync message was sent

10

Follow_up Message Packet

S.No

Protocol Packet

Description

Size(Bytes)

2

Follow_Up Message

Sent by the master clock to provide precise timestamp of the Sync message.

4464

Transport Header

UDP/IP header

28

PTP Header

Common PTP message header

34

Precise Origin Timestamp

Accurate timestamp of the Sync message

10

Delay_Req Message Packet

S.No

Protocol Packet

Description

Size(Bytes)

3

Delay_Req Message

Sent by the slave clock to measure delay to the master.

4464

Transport Header

UDP/IP header

28

PTP Header

Common PTP message header

34

Origin Timestamp

Time when Delay_Req was sent

10

Delay_Resp Packet

S.No

Protocol Packet

Description

Size(Bytes)

4

Delay_Resp Message

Sent by the master clock in response to Delay_Req, includes timestamp.

4464

Transport Header

UDP/IP header

28

PTP Header

Common PTP message header

34

Receive Timestamp

Time when Delay_Req was received

10

Requesting Port ID

Identifies the slave that sent Delay_Req

10

Management Message Packet

S.No

Protocol Packet

Description

Size(Bytes)

5

Management Message

Used for configuration, monitoring, and diagnostics of PTP devices.

48128+

Transport Header

UDP/IP header

28

PTP Header

Common PTP message header

34

Management TLV

Type-Length-Value structure for management data

Variable (up to 64+)

Announce Message Packet

S.No

Protocol Packet

Description

Size(Bytes)

6

Announce Message

Introduced in PTP v2 (IEEE 1588-2008); used for Best Master Clock algorithm.

~81100

Transport Header

UDP/IP header

28

PTP Header

Common header for all PTP messages

34

Current UTC Offset

Offset from TAI to UTC

2

Grandmaster Priority 1

Priority value used in BMCA

1

Clock Quality

Includes clock class, accuracy, and variance

4

Grandmaster Priority 2

Secondary priority value

1

Grandmaster Identity

Unique identifier of the grandmaster clock

8

Steps Removed

Number of steps from grandmaster

2

Time Source

Indicates source of time (e.g., GPS, atomic)

1

Signaling Message Packet

S.No

Protocol Packet

Description

Size(Bytes)

7

Signaling Message

Also introduced in PTP v2; used for optional features like unicast negotiation.

~72128+

Transport Header

UDP/IP header

28

PTP Header

Common header for all PTP messages

34

Target Port Identity

Identifies the recipient of the signaling message

10

TLV (Type-Length-Value)

Optional data block for negotiation or configuration

Variable (up to 64+)

S.No

Use Case

Description

1

Telecommunications

PTP is used to synchronize base stations in mobile networks (e.g., 4G/5G) to ensure seamless handovers and accurate time stamping for call/data sessions.

2

Power and Energy Systems

In smart grids and substations, PTP ensures precise time alignment for phasor measurement units (PMUs), fault detection, and event logging.

3

Financial Trading Systems

PTP provides sub-microsecond timestamping for trades, ensuring compliance with regulations like MiFID II and enabling accurate audit trails.

4

Industrial Automation

Used in factory automation and robotics to synchronize sensors, actuators, and controllers for real-time operations.

5

Broadcast and Media

PTP synchronizes audio/video equipment and cameras to maintain lip-sync and frame alignment in live production environments.

6

Aerospace and Defense

Ensures synchronized operations in radar systems, navigation, and mission-critical communication systems.

7

Data Centers and Cloud

PTP is used to synchronize distributed systems and logs across servers for consistency, debugging, and security auditing.

8

Railway and Transportation

Enables synchronized signaling, control systems, and event logging for safety and efficiency.

9

Scientific Research

Used in particle accelerators, telescopes, and observatories where precise timing is critical for data correlation.

10

Healthcare and Medical Devices

Synchronizes imaging systems and patient monitoring equipment for accurate diagnostics and data logging.

S.No

Feature

Description

1

High Precision Time Sync

Provides sub-microsecond synchronization accuracy across networked devices.

2

Master-Slave Architecture

Uses a hierarchical model where slave clocks sync to a master clock.

3

Hardware Timestamping

Enables precise time capture at the physical layer, reducing jitter and delay.

4

Event and General Messages

Separates time-critical (event) and control (general) messages for efficiency.

5

Loopback Testing Support

Allows internal testing of timestamp accuracy and delay within a single device.

6

Delay Measurement Mechanism

Uses Delay_Req and Delay_Resp messages to calculate network delay.

7

Best Master Clock Algorithm

Automatically selects the most accurate clock in the network.

8

Multicast and Unicast Support

Supports both multicast (default) and unicast (optimized) communication modes.

9

Profile-Based Configuration

Allows customization for specific industries (e.g., telecom, power, AVB).

10

Scalability

Can be deployed in small LANs or large-scale industrial and telecom networks.

High Precision Time Sync- Testcases

S.No

Test Case

Description

Expected Result

1

Basic Sync

Sync slave with master

Offset < 1s

2

Sync Interval

Test sync every 1s

Consistent updates

3

Delay Request Interval

Set delay request to 2s

Delay measured correctly

4

One-Step Clock

Use one-step clock mode

Accurate timestamps

5

Two-Step Clock

Use two-step clock mode

Accurate timestamps

6

Sync with GPS Master

Use GPS as master clock

High accuracy

7

Sync with Boundary Clock

Use boundary clock

Stable sync

8

Sync with Transparent Clock

Use transparent clock

Delay corrected

9

Clock Drift Compensation

Simulate drift

Drift corrected

10

Network Congestion

Introduce congestion

Sync remains accurate

11

Packet Loss

Drop 10% PTP packets

Sync maintained

12

Jitter Injection

Inject jitter

Offset within tolerance

13

Asymmetric Delay

Simulate asymmetric path

Delay compensated

14

Grandmaster Failover

Switch master

Seamless transition

15

Slave Clock Reset

Reset slave clock

Resyncs quickly

16

Master Clock Reset

Reset master clock

Slaves resync

17

Sync Accuracy Logging

Log sync accuracy

Offset < 1s

18

Sync Stability

Monitor over 24h

Stable offset

19

Sync with VLAN

Use VLAN tagging

Sync unaffected

20

Sync with QoS

Apply QoS to PTP

Prioritized packets

21

Sync with Encryption

Encrypt PTP packets

Sync still accurate

22

Sync with Authentication

Use PTP security

Authenticated sync

23

Sync with IPv6

Use IPv6 transport

Sync successful

24

Sync with Multicast

Use multicast mode

All slaves sync

25

Sync with Unicast

Use unicast mode

All slaves sync

26

Sync with Mixed Mode

Mix unicast/multicast

Sync maintained

27

Sync with Hardware Timestamping

Enable HW timestamp

High precision

28

Sync with Software Timestamping

Use SW timestamp

Lower precision

29

Sync with NTP Comparison

Compare with NTP

PTP more accurate

30

Sync with Leap Second

Simulate leap second

Handled correctly

31

Sync with Daylight Saving

DST change

No time jump

32

Sync with Time Zone Change

Change time zone

UTC unaffected

33

Sync with Multiple Slaves

100 slaves

All in sync

34

Sync with Multiple Masters

Multiple domains

Correct domain sync

35

Sync with Network Reboot

Reboot switch

Sync resumes

36

Sync with Slave Reboot

Reboot slave

Resyncs automatically

37

Sync with Master Reboot

Reboot master

Slaves resync

38

Sync with NIC Change

Change NIC

Sync continues

39

Sync with Interface Down

Bring interface down

Sync lost

40

Sync with Interface Up

Bring interface up

Sync resumes

41

Sync with Firewall

Enable firewall

PTP ports allowed

42

Sync with IDS/IPS

Enable IDS

No false positives

43

Sync with Logging Enabled

Enable logs

Events recorded

44

Sync with Monitoring Tool

Use PTP monitor

Accurate stats

45

Sync with SNMP

Query via SNMP

PTP data available

46

Sync with CLI

Use CLI tool

Shows sync status

47

Sync with GUI

Use GUI dashboard

Shows sync accuracy

48

Sync with API

Query via API

Offset and delay shown

49

Sync with Load Test

High CPU/network load

Sync stable

50

Sync with Time Drift Alert

Set alert threshold

Alert triggered on drift

Master Slave Architecture - Testcases

S.No

Test Case

Description

Expected Result

1

Master Election

Elect best master clock

Highest priority clock selected

2

Slave Discovery

Slave detects master

Master identified

3

Announce Message Reception

Slave receives announce

Message processed

4

Sync Message Reception

Slave receives sync

Clock adjusted

5

Delay Request/Response

Slave sends delay request

Master responds correctly

6

BMCA Execution

Run Best Master Clock Algorithm

Correct master selected

7

Master Priority Change

Change master priority

New master elected

8

Slave Priority Change

Change slave priority

No master role assumed

9

Master Clock Failure

Simulate master failure

New master elected

10

Slave Clock Failure

Simulate slave failure

No impact on others

11

Master Clock Recovery

Recover failed master

Rejoins as slave

12

Slave Clock Recovery

Recover failed slave

Resyncs with master

13

Multiple Masters

Introduce multiple masters

Best one selected

14

Multiple Slaves

Add 100 slaves

All sync to master

15

Master Clock Drift

Simulate drift

Slaves adjust accordingly

16

Slave Clock Drift

Simulate drift

Corrected by sync

17

Master Clock Reboot

Reboot master

New master elected

18

Slave Clock Reboot

Reboot slave

Resyncs automatically

19

Master Clock Logging

Enable logs

Sync events logged

20

Slave Clock Logging

Enable logs

Sync events logged

21

Master Clock Monitoring

Monitor master

Status visible

22

Slave Clock Monitoring

Monitor slave

Status visible

23

Master Clock SNMP

Query via SNMP

Master data available

24

Slave Clock SNMP

Query via SNMP

Slave data available

25

Master Clock CLI

Use CLI tool

Shows master status

26

Slave Clock CLI

Use CLI tool

Shows slave status

27

Master Clock GUI

Use GUI dashboard

Master shown

28

Slave Clock GUI

Use GUI dashboard

Slave shown

29

Master Clock API

Query via API

Master info returned

30

Slave Clock API

Query via API

Slave info returned

31

Master Clock Authentication

Enable auth

Only trusted slaves sync

32

Slave Clock Authentication

Enable auth

Only trusted master accepted

33

Master Clock Encryption

Encrypt messages

Sync still accurate

34

Slave Clock Encryption

Decrypt messages

Sync successful

35

Master Clock VLAN

Use VLAN tagging

Sync unaffected

36

Slave Clock VLAN

Use VLAN tagging

Sync unaffected

37

Master Clock QoS

Apply QoS

PTP traffic prioritized

38

Slave Clock QoS

Apply QoS

PTP traffic prioritized

39

Master Clock with GPS

Use GPS as source

High accuracy

40

Slave Clock with GPS

Compare with GPS

PTP matches GPS

41

Master Clock with Boundary Clock

Use boundary clock

Sync relayed correctly

42

Slave Clock with Transparent Clock

Use transparent clock

Delay corrected

43

Master Clock in Multicast Mode

Use multicast

All slaves sync

44

Slave Clock in Unicast Mode

Use unicast

Sync successful

45

Master Clock in Hybrid Mode

Mix unicast/multicast

Sync maintained

46

Master Clock Load Test

High traffic load

Sync stable

47

Slave Clock Load Test

High CPU load

Sync stable

48

Master Clock Time Jump

Simulate time jump

Slaves adjust

49

Slave Clock Time Jump

Simulate time jump

Corrected by master

50

Master-Slave Role Reversal

Promote slave to master

New master functions correctly

Hardware Timestamping - Testcases

S.No

Test Case

Description

Expected Result

1

Enable HW Timestamping

Enable on NIC

Timestamping enabled

2

Disable HW Timestamping

Disable on NIC

Timestamping disabled

3

HW Timestamp Accuracy

Compare with GPS

Accuracy < 100ns

4

HW vs SW Timestamp

Compare both

HW more accurate

5

HW Timestamp Drift

Monitor over time

Minimal drift

6

HW Timestamp Stability

Under load

Stable timestamps

7

HW Timestamp with Sync

Use in sync messages

Accurate sync

8

HW Timestamp with Delay Req

Use in delay request

Accurate delay calc

9

HW Timestamp with Delay Resp

Use in delay response

Accurate delay calc

10

HW Timestamp with Announce

Use in announce

Valid timestamp

11

HW Timestamp with One-Step Clock

Enable one-step

Accurate timestamp in sync

12

HW Timestamp with Two-Step Clock

Enable two-step

Accurate follow-up

13

HW Timestamp on Master

Enable on master

Accurate sync sent

14

HW Timestamp on Slave

Enable on slave

Accurate delay measured

15

HW Timestamp on Boundary Clock

Enable on BC

Accurate forwarding

16

HW Timestamp on Transparent Clock

Enable on TC

Accurate correction

17

HW Timestamp with VLAN

Use VLAN tagging

Timestamp unaffected

18

HW Timestamp with QoS

Apply QoS

Timestamp unaffected

19

HW Timestamp with IPv6

Use IPv6 transport

Timestamp valid

20

HW Timestamp with Multicast

Use multicast

Timestamp valid

21

HW Timestamp with Unicast

Use unicast

Timestamp valid

22

HW Timestamp with Encryption

Encrypt packets

Timestamp still valid

23

HW Timestamp with Authentication

Enable auth

Timestamp valid

24

HW Timestamp with NIC Reboot

Reboot NIC

Timestamping resumes

25

HW Timestamp with NIC Driver Reload

Reload driver

Timestamping resumes

26

HW Timestamp with NIC Change

Replace NIC

Timestamping supported

27

HW Timestamp with Firmware Update

Update firmware

Timestamping intact

28

HW Timestamp with OS Reboot

Reboot system

Timestamping resumes

29

HW Timestamp with High CPU Load

Stress CPU

Timestamping stable

30

HW Timestamp with High Network Load

Stress network

Timestamping stable

31

HW Timestamp with Packet Loss

Drop packets

Timestamping unaffected

32

HW Timestamp with Jitter

Inject jitter

Timestamping accurate

33

HW Timestamp with Delay

Inject delay

Timestamping accurate

34

HW Timestamp with Logging

Enable logs

Timestamps logged

35

HW Timestamp with Monitoring Tool

Use PTP monitor

HW timestamps visible

36

HW Timestamp with SNMP

Query via SNMP

Timestamp data available

37

HW Timestamp with CLI

Use CLI tool

Timestamping status shown

38

HW Timestamp with GUI

Use GUI dashboard

Timestamping status shown

39

HW Timestamp with API

Query via API

Timestamp data returned

40

HW Timestamp with Time Jump

Simulate time jump

Timestamping adjusts

41

HW Timestamp with Time Drift

Simulate drift

Timestamping compensates

42

HW Timestamp with Boundary Clock Failover

Fail BC

Timestamping continues

43

HW Timestamp with Transparent Clock Delay

Add delay

Correction field accurate

44

HW Timestamp with Multiple Interfaces

Enable on all

All interfaces timestamp

45

HW Timestamp with Multiple Domains

Use multiple PTP domains

Timestamping per domain

46

HW Timestamp with Sync Interval Change

Change interval

Timestamping adapts

47

HW Timestamp with Delay Interval Change

Change delay interval

Timestamping adapts

48

HW Timestamp with NIC Buffer Overflow

Overflow buffer

Timestamping stable

49

HW Timestamp with NIC Interrupt Storm

Simulate storm

Timestamping stable

50

HW Timestamp with External Time Source

Compare with GPS/IRIG

Timestamping matches

Event and General Messages - Testcases

S.No

Test Case

Description

Expected Result

1

Sync Message Transmission

Master sends Sync

Sync sent with timestamp

2

Sync Message Reception

Slave receives Sync

Sync processed

3

Follow_Up Message Transmission

Master sends Follow_Up

Follow_Up sent with timestamp

4

Follow_Up Message Reception

Slave receives Follow_Up

Timestamp updated

5

Delay_Req Message Transmission

Slave sends Delay_Req

Message sent to master

6

Delay_Req Message Reception

Master receives Delay_Req

Timestamp recorded

7

Delay_Resp Message Transmission

Master sends Delay_Resp

Message sent to slave

8

Delay_Resp Message Reception

Slave receives Delay_Resp

Delay calculated

9

Announce Message Transmission

Master sends Announce

Message broadcasted

10

Announce Message Reception

Slave receives Announce

Master info updated

11

Management Message Transmission

Send management message

Message sent successfully

12

Management Message Reception

Receive management message

Message processed

13

Sync Message with HW Timestamp

Use hardware timestamp

Accurate timestamp recorded

14

Follow_Up with HW Timestamp

Use hardware timestamp

Accurate timestamp recorded

15

Delay_Req with HW Timestamp

Use hardware timestamp

Accurate timestamp recorded

16

Delay_Resp with HW Timestamp

Use hardware timestamp

Accurate timestamp recorded

17

Sync Message Loss

Drop Sync message

Slave waits for next

18

Follow_Up Message Loss

Drop Follow_Up

Slave ignores Sync

19

Delay_Req Message Loss

Drop Delay_Req

No Delay_Resp sent

20

Delay_Resp Message Loss

Drop Delay_Resp

Delay not updated

21

Announce Message Loss

Drop Announce

BMCA re-evaluated

22

Message Timestamp Validation

Check timestamp format

Valid timestamp

23

Message Interval Accuracy

Check message intervals

Matches configured interval

24

Message Sequence ID Check

Verify sequence IDs

IDs increment correctly

25

Message Domain Check

Use multiple domains

Messages isolated

26

Message Priority Check

Set different priorities

Higher priority wins

27

Message Authentication

Enable authentication

Only valid messages accepted

28

Message Encryption

Encrypt messages

Decrypted and processed

29

Message with VLAN Tag

Send over VLAN

Message received correctly

30

Message with QoS

Apply QoS

Prioritized delivery

31

Message with IPv6

Use IPv6 transport

Message delivered

32

Message with Multicast

Use multicast

All slaves receive

33

Message with Unicast

Use unicast

Targeted delivery

34

Message with Mixed Mode

Use both modes

All messages delivered

35

Message with Delay Variation

Inject delay

Delay compensated

36

Message with Jitter

Inject jitter

Sync remains stable

37

Message with Packet Duplication

Duplicate messages

Duplicates ignored

38

Message with Packet Reordering

Reorder messages

Correct order restored

39

Message with Packet Corruption

Corrupt message

Message discarded

40

Message Logging

Enable logging

Messages logged

41

Message Monitoring Tool

Use PTP monitor

Messages visible

42

Message SNMP Query

Query via SNMP

Message stats available

43

Message CLI Tool

Use CLI

Message counters shown

44

Message GUI Dashboard

Use GUI

Message flow visualized

45

Message API Access

Query via API

Message data returned

46

Message Load Test

High message rate

No loss or delay

47

Message Under CPU Load

High CPU usage

Messages processed

48

Message Under Network Load

High network usage

Messages delivered

49

Message with Time Jump

Simulate time jump

Messages adjust

50

Message with Clock Drift

Simulate drift

Messages correct offset

Loopback Testing Support Algorithm - Testcases

S.No

Test Case

Description

Expected Result

1

Enable Loopback Mode

Activate loopback on PTP interface

Loopback mode enabled

2

Disable Loopback Mode

Deactivate loopback

Loopback mode disabled

3

Loopback Sync Message

Send Sync in loopback

Message received internally

4

Loopback Follow_Up Message

Send Follow_Up in loopback

Message processed

5

Loopback Delay_Req Message

Send Delay_Req in loopback

Message received

6

Loopback Delay_Resp Message

Send Delay_Resp in loopback

Message processed

7

Loopback Announce Message

Send Announce in loopback

Message received

8

Loopback Management Message

Send management message

Message processed

9

Loopback Timestamp Accuracy

Measure timestamp accuracy

Offset < 100ns

10

Loopback Clock Sync

Perform full sync loopback

Clock adjusted correctly

11

Loopback with HW Timestamp

Enable hardware timestamp

Accurate timestamps

12

Loopback with SW Timestamp

Use software timestamp

Lower precision

13

Loopback Packet Loss Simulation

Drop packets in loopback

System handles loss

14

Loopback Jitter Simulation

Inject jitter

Sync remains stable

15

Loopback Delay Simulation

Inject delay

Delay compensated

16

Loopback Message Order

Reorder messages

Correct order restored

17

Loopback Message Duplication

Duplicate messages

Duplicates ignored

18

Loopback Message Corruption

Corrupt message

Message discarded

19

Loopback Message Logging

Enable logging

Messages logged

20

Loopback Message Monitoring

Use monitoring tool

Loopback traffic visible

21

Loopback Message SNMP

Query via SNMP

Loopback stats available

22

Loopback Message CLI

Use CLI tool

Loopback status shown

23

Loopback Message GUI

Use GUI dashboard

Loopback activity shown

24

Loopback Message API

Query via API

Loopback data returned

25

Loopback with Multicast

Use multicast in loopback

Message processed

26

Loopback with Unicast

Use unicast in loopback

Message processed

27

Loopback with VLAN

Use VLAN tagging

Message processed

28

Loopback with QoS

Apply QoS

Prioritized processing

29

Loopback with IPv6

Use IPv6 transport

Message processed

30

Loopback with Authentication

Enable auth

Message validated

31

Loopback with Encryption

Encrypt messages

Decrypted and processed

32

Loopback with Boundary Clock

Test BC in loopback

Sync relayed correctly

33

Loopback with Transparent Clock

Test TC in loopback

Delay corrected

34

Loopback with Time Jump

Simulate time jump

System adjusts

35

Loopback with Clock Drift

Simulate drift

Drift corrected

36

Loopback with High CPU Load

Stress CPU

Loopback stable

37

Loopback with High Network Load

Stress network

Loopback unaffected

38

Loopback with NIC Reboot

Reboot NIC

Loopback resumes

39

Loopback with NIC Driver Reload

Reload driver

Loopback resumes

40

Loopback with Interface Down

Bring interface down

Loopback fails

41

Loopback with Interface Up

Bring interface up

Loopback resumes

42

Loopback with Multiple Interfaces

Enable on all

Loopback works per interface

43

Loopback with Multiple Domains

Use multiple PTP domains

Loopback isolated

44

Loopback with Sync Interval Change

Change interval

Loopback adapts

45

Loopback with Delay Interval Change

Change delay interval

Loopback adapts

46

Loopback with Message Rate Limit

Limit message rate

Loopback respects limit

47

Loopback with Logging Level Change

Change log level

Logs reflect change

48

Loopback with Monitoring Interval

Change interval

Stats update accordingly

49

Loopback with Alert Threshold

Set alert on offset

Alert triggered

50

Loopback Test Completion

Run full loopback test

All checks pass

Delay Measurement Mechanism - Testcases

S.No

Test Case

Description

Expected Result

1

Basic Delay Measurement

Send Delay_Req and receive Delay_Resp

Delay calculated correctly

2

One-Step Clock Delay

Use one-step clock

Accurate delay with embedded timestamp

3

Two-Step Clock Delay

Use two-step clock

Accurate delay using Follow_Up

4

Hardware Timestamping

Use HW timestamps

High-precision delay

5

Software Timestamping

Use SW timestamps

Lower precision delay

6

Asymmetric Path Delay

Simulate asymmetric delay

Detected and compensated

7

Symmetric Path Delay

Equal delay both ways

Accurate delay

8

Delay with VLAN

Send over VLAN

Delay measured correctly

9

Delay with QoS

Apply QoS

Delay unaffected

10

Delay with IPv6

Use IPv6 transport

Delay measured

11

Delay with Multicast

Use multicast

Delay measured

12

Delay with Unicast

Use unicast

Delay measured

13

Delay with Transparent Clock

Use TC

Correction field applied

14

Delay with Boundary Clock

Use BC

Delay relayed correctly

15

Delay with Packet Loss

Drop Delay_Req

No Delay_Resp received

16

Delay with Packet Duplication

Duplicate Delay_Req

Only one Delay_Resp used

17

Delay with Packet Reordering

Reorder packets

Correct delay calculated

18

Delay with Packet Corruption

Corrupt Delay_Resp

Message discarded

19

Delay with Jitter

Inject jitter

Delay remains stable

20

Delay with Network Congestion

Simulate congestion

Delay increases, detected

21

Delay with Time Jump

Simulate time jump

Delay recalculated

22

Delay with Clock Drift

Simulate drift

Delay compensates

23

Delay with High CPU Load

Stress CPU

Delay measured accurately

24

Delay with High Network Load

Stress network

Delay measured accurately

25

Delay Interval Change

Change delay interval

Delay messages adapt

26

Delay with Logging Enabled

Enable logs

Delay events logged

27

Delay with Monitoring Tool

Use PTP monitor

Delay visible

28

Delay with SNMP

Query via SNMP

Delay stats available

29

Delay with CLI

Use CLI tool

Delay shown

30

Delay with GUI

Use GUI dashboard

Delay visualized

31

Delay with API

Query via API

Delay data returned

32

Delay with Authentication

Enable auth

Delay messages validated

33

Delay with Encryption

Encrypt messages

Delay calculated

34

Delay with Management Messages

Use mgmt interface

Delay stats queried

35

Delay with Multiple Slaves

100 slaves

All measure delay

36

Delay with Multiple Masters

Multiple domains

Delay per domain

37

Delay with NIC Reboot

Reboot NIC

Delay resumes

38

Delay with NIC Driver Reload

Reload driver

Delay resumes

39

Delay with Interface Down

Bring interface down

Delay fails

40

Delay with Interface Up

Bring interface up

Delay resumes

41

Delay with Loopback Mode

Use loopback

Delay = 0 or near-zero

42

Delay with GPS Master

Use GPS source

Delay accurate

43

Delay with External Time Source

Compare with IRIG/GPS

Delay matches

44

Delay with Alert Threshold

Set alert on delay

Alert triggered

45

Delay with Time Sync

Use delay in sync

Offset adjusted

46

Delay with Follow_Up Message

Use Follow_Up

Accurate delay

47

Delay with Announce Message

Use announce info

Delay context updated

48

Delay with Management Reset

Reset delay stats

Delay recalculated

49

Delay with Message Rate Limit

Limit delay messages

Delay still accurate

50

Delay with Test Harness

Use test tool

Delay validated

Best Master CLock Algorithm - Testcases

S.No

Test Case

Description

Expected Result

1

Single Master Available

Only one master present

Master selected

2

Multiple Masters, Different Priorities

Compare priority1 values

Lowest priority1 wins

3

Equal Priority1, Different Clock Class

Compare clockClass

Best class wins

4

Equal Clock Class, Different Accuracy

Compare clockAccuracy

Most accurate wins

5

Equal Accuracy, Different Offset Scaled Log Variance

Compare variance

Lowest wins

6

Equal Variance, Different Priority2

Compare priority2

Lowest wins

7

Equal All, Different Clock Identity

Compare clockIdentity

Lowest ID wins

8

Master Clock Failure

Master goes offline

New master elected

9

Master Clock Recovery

Failed master returns

Remains slave if not better

10

Slave Clock Becomes Better

Slave has better attributes

Becomes new master

11

Grandmaster Clock Change

New grandmaster joins

BMCA re-evaluates

12

Boundary Clock Participation

BC participates in BMCA

Best BC wins

13

Transparent Clock in Path

TC in path

BMCA unaffected

14

Announce Message Loss

Drop announce

BMCA waits for timeout

15

Announce Timeout

No announce received

BMCA triggers reelection

16

Announce Interval Change

Change interval

BMCA adapts

17

Domain Number Conflict

Same domain, different masters

BMCA resolves

18

Multiple Domains

Different domain numbers

BMCA runs per domain

19

Clock Identity Conflict

Duplicate clock IDs

BMCA fails or logs error

20

Clock Class Upgrade

Upgrade clock class

BMCA reselects master

21

Clock Accuracy Downgrade

Reduce accuracy

BMCA reselects master

22

Priority1 Change

Change priority1

BMCA re-evaluates

23

Priority2 Change

Change priority2

BMCA re-evaluates

24

Clock Quality Change

Change clock quality

BMCA re-evaluates

25

Clock Source Change

Switch to GPS

BMCA prefers GPS master

26

Clock Drift Simulation

Simulate drift

BMCA may reselect

27

Clock Jump Simulation

Simulate time jump

BMCA may reselect

28

BMCA with VLAN

Use VLAN tagging

BMCA functions normally

29

BMCA with QoS

Apply QoS

BMCA unaffected

30

BMCA with IPv6

Use IPv6 transport

BMCA functions normally

31

BMCA with Multicast

Use multicast

BMCA functions normally

32

BMCA with Unicast

Use unicast

BMCA functions normally

33

BMCA with Authentication

Enable auth

Only trusted clocks participate

34

BMCA with Encryption

Encrypt announce messages

BMCA functions securely

35

BMCA with Logging

Enable logs

BMCA decisions logged

36

BMCA with Monitoring Tool

Use PTP monitor

Master selection visible

37

BMCA with SNMP

Query via SNMP

BMCA status available

38

BMCA with CLI

Use CLI tool

Master info shown

39

BMCA with GUI

Use GUI dashboard

Master selection visualized

40

BMCA with API

Query via API

Master info returned

41

BMCA with High Network Load

Stress network

BMCA still functions

42

BMCA with High CPU Load

Stress CPU

BMCA still functions

43

BMCA with Clock Identity Change

Change clock ID

BMCA re-evaluates

44

BMCA with Clock Reset

Reset clock

BMCA re-evaluates

45

BMCA with Management Message

Query BMCA status

Correct info returned

46

BMCA with Multiple Interfaces

Multiple NICs

BMCA per interface

47

BMCA with Loopback Mode

Use loopback

BMCA runs locally

48

BMCA with Alert Threshold

Set alert on master change

Alert triggered

49

BMCA with Time Sync

Sync follows BMCA decision

Slaves sync to best master

50

BMCA with Test Harness

Use test tool

BMCA behavior validated

Multicast and Unicast Support - Testcases

S.No

Test Case

Description

Expected Result

1

Enable Multicast Mode

Configure PTP to use multicast

Multicast messages transmitted

2

Enable Unicast Mode

Configure PTP to use unicast

Unicast messages transmitted

3

Multicast Sync Message

Send Sync via multicast

All slaves receive

4

Unicast Sync Message

Send Sync via unicast

Target slave receives

5

Multicast Delay_Req

Slave sends Delay_Req via multicast

Master receives

6

Unicast Delay_Req

Slave sends Delay_Req via unicast

Master receives

7

Multicast Delay_Resp

Master sends Delay_Resp via multicast

All slaves receive

8

Unicast Delay_Resp

Master sends Delay_Resp via unicast

Target slave receives

9

Multicast Announce Message

Master sends Announce via multicast

All slaves receive

10

Unicast Announce Message

Master sends Announce via unicast

Target slave receives

11

Multicast Follow_Up Message

Master sends Follow_Up via multicast

All slaves receive

12

Unicast Follow_Up Message

Master sends Follow_Up via unicast

Target slave receives

13

Multicast Join Group

Slave joins multicast group

Group joined successfully

14

Multicast Leave Group

Slave leaves multicast group

Group left successfully

15

Unicast Negotiation

Slave requests unicast transmission

Master grants request

16

Multicast Packet Loss

Drop multicast packets

Slaves handle loss

17

Unicast Packet Loss

Drop unicast packets

Retransmission or timeout

18

Multicast Packet Duplication

Duplicate multicast packets

Duplicates ignored

19

Unicast Packet Duplication

Duplicate unicast packets

Duplicates ignored

20

Multicast Packet Reordering

Reorder multicast packets

Correct order restored

21

Unicast Packet Reordering

Reorder unicast packets

Correct order restored

22

Multicast with VLAN

Use VLAN tagging

Multicast works correctly

23

Unicast with VLAN

Use VLAN tagging

Unicast works correctly

24

Multicast with QoS

Apply QoS

Multicast prioritized

25

Unicast with QoS

Apply QoS

Unicast prioritized

26

Multicast with IPv6

Use IPv6 transport

Multicast works

27

Unicast with IPv6

Use IPv6 transport

Unicast works

28

Multicast with Authentication

Enable auth

Only valid messages accepted

29

Unicast with Authentication

Enable auth

Only valid messages accepted

30

Multicast with Encryption

Encrypt messages

Decrypted and processed

31

Unicast with Encryption

Encrypt messages

Decrypted and processed

32

Multicast with Boundary Clock

Use BC in multicast

Sync relayed correctly

33

Unicast with Boundary Clock

Use BC in unicast

Sync relayed correctly

34

Multicast with Transparent Clock

Use TC in multicast

Delay corrected

35

Unicast with Transparent Clock

Use TC in unicast

Delay corrected

36

Multicast with High Network Load

Stress network

Multicast stable

37

Unicast with High Network Load

Stress network

Unicast stable

38

Multicast with Monitoring Tool

Use PTP monitor

Multicast traffic visible

39

Unicast with Monitoring Tool

Use PTP monitor

Unicast traffic visible

40

Multicast with Logging

Enable logs

Multicast events logged

41

Unicast with Logging

Enable logs

Unicast events logged

42

Multicast with SNMP

Query via SNMP

Multicast stats available

43

Unicast with SNMP

Query via SNMP

Unicast stats available

44

Multicast with CLI

Use CLI tool

Multicast status shown

45

Unicast with CLI

Use CLI tool

Unicast status shown

46

Multicast with GUI

Use GUI dashboard

Multicast visualized

47

Unicast with GUI

Use GUI dashboard

Unicast visualized

48

Multicast with API

Query via API

Multicast data returned

49

Unicast with API

Query via API

Unicast data returned

50

Mixed Mode Operation

Use both multicast and unicast

Both modes function correctly

Profile-Based Configuration - Testcases

S.No

Test Case

Description

Expected Result

1

Load Default Profile

Load default PTP profile

Default profile parameters are applied

2

Load IEEE 1588-2008 Profile

Load IEEE 1588-2008 profile

IEEE 1588-2008 parameters are applied

3

Load Telecom Profile G.8275.1

Load Telecom Profile G.8275.1

G.8275.1 parameters are applied

4

Load Power Profile

Load Power Profile

Power profile parameters are applied

5

Load Custom Profile

Load custom user-defined profile

Custom parameters are applied correctly

6

Switch Profiles

Switch between profiles dynamically

System switches without error or time loss

7

Validate Profile Parameters

Validate profile parameter consistency

All parameters match profile specification

8

Invalid Profile Name

Apply invalid profile name

Error message is shown, no change applied

9

Missing Parameters

Apply profile with missing parameters

Error or fallback to default values

10

Save Profile

Save current configuration as a new profile

Profile saved and reusable

11

Delete Profile

Delete an existing profile

Profile removed from system

12

Delete Active Profile

Attempt to delete active profile

Operation blocked with warning

13

Profile Persistence

Profile persistence after reboot

Last used profile is retained

14

Apply via CLI

Apply profile via CLI

Profile applied successfully

15

Apply via GUI

Apply profile via GUI

Profile applied successfully

16

Apply via API

Apply profile via API

Profile applied successfully

17

Sync Interval

Validate sync interval from profile

Sync interval matches profile

18

Announce Interval

Validate announce interval from profile

Announce interval matches profile

19

Delay Mechanism

Validate delay mechanism from profile

Delay mechanism (E2E/P2P) is correct

20

Domain Number

Validate domain number from profile

Domain number is correctly set

21

Priority Values

Validate priority1 and priority2 values

Values match profile

22

Clock Class and Accuracy

Validate clockClass and clockAccuracy

Values match profile

23

Time Source

Validate timeSource field

Matches profile specification

24

Log Sync Interval

Validate logSyncInterval

Matches expected value

25

Log Announce Interval

Validate logAnnounceInterval

Matches expected value

26

Log Delay Req Interval

Validate logMinDelayReqInterval

Matches expected value

27

Boundary Clock

Validate profile on boundary clock

Boundary clock uses correct parameters

28

Transparent Clock

Validate profile on transparent clock

Transparent clock uses correct parameters

29

Ordinary Clock

Validate profile on ordinary clock

Ordinary clock uses correct parameters

30

Slave-Only Mode

Validate profile on slave-only device

Slave-only mode is enforced

31

Master-Only Mode

Validate profile on master-only device

Master-only mode is enforced

32

Hardware Timestamping

Validate profile with hardware timestamping

Hardware timestamping is enabled

33

Software Timestamping

Validate profile with software timestamping

Software timestamping is used

34

Multicast Transport

Validate profile with multicast transport

Multicast is used as per profile

35

Unicast Transport

Validate profile with unicast transport

Unicast is used as per profile

36

Hybrid Transport

Validate profile with hybrid transport

Hybrid transport is correctly configured

37

VLAN Tagging

Validate profile with VLAN tagging

VLAN settings are applied

38

QoS Settings

Validate profile with QoS settings

QoS settings match profile

39

Security Settings

Validate profile with security settings

Security parameters are enforced

40

BMCA Settings

Validate profile with BMCA settings

BMCA behavior matches profile

41

Alternate BMCA

Validate profile with alternate BMCA

Alternate BMCA is used if specified

42

Time Traceability

Validate profile with time traceability

Time traceability flags are correct

43

Leap Second Handling

Validate profile with leap second handling

Leap second behavior matches profile

44

UTC Offset

Validate profile with UTC offset

UTC offset is correctly applied

45

Time-of-Day Distribution

Validate profile with time-of-day distribution

ToD distribution is enabled

46

Holdover Settings

Validate profile with holdover settings

Holdover behavior matches profile

47

Servo Tuning

Validate profile with servo tuning parameters

Servo parameters are applied

48

Sync Packet Rate

Validate profile with sync packet rate

Sync packet rate matches profile

49

Announce Timeout

Validate profile with announce timeout

Timeout value is correct

50

Rollback on Failure

Validate profile rollback on failure

System reverts to last known good profile

Scalability - Testcases

S.No

Test Case

Description

Expected Result

1

10 Clients

Verify sync with 10 clients

All clients sync correctly

2

50 Clients

Verify sync with 50 clients

All clients sync correctly

3

100 Clients

Verify sync with 100 clients

All clients sync correctly

4

200 Clients

Verify sync with 200 clients

All clients sync correctly

5

500 Clients

Verify sync with 500 clients

All clients sync correctly

6

1000 Clients

Verify sync with 1000 clients

All clients sync correctly

7

10 Boundary Clocks

Test with 10 boundary clocks

All sync correctly

8

50 Boundary Clocks

Test with 50 boundary clocks

All sync correctly

9

100 Boundary Clocks

Test with 100 boundary clocks

All sync correctly

10

10 Transparent Clocks

Test with 10 transparent clocks

All function correctly

11

50 Transparent Clocks

Test with 50 transparent clocks

All function correctly

12

100 Transparent Clocks

Test with 100 transparent clocks

All function correctly

13

10 Master Clocks

Test with 10 master clocks

All function correctly

14

50 Master Clocks

Test with 50 master clocks

All function correctly

15

100 Master Clocks

Test with 100 master clocks

All function correctly

16

10 Slave Clocks

Test with 10 slave clocks

All sync correctly

17

50 Slave Clocks

Test with 50 slave clocks

All sync correctly

18

100 Slave Clocks

Test with 100 slave clocks

All sync correctly

19

10 Domains

Test sync across 10 domains

All domains sync independently

20

50 Domains

Test sync across 50 domains

All domains sync independently

21

100 Domains

Test sync across 100 domains

All domains sync independently

22

10 VLANs

Test sync across 10 VLANs

All VLANs sync correctly

23

50 VLANs

Test sync across 50 VLANs

All VLANs sync correctly

24

100 VLANs

Test sync across 100 VLANs

All VLANs sync correctly

25

Multicast Transport

Test scalability with multicast

All clients receive sync

26

Unicast Transport

Test scalability with unicast

All clients receive sync

27

Hybrid Transport

Test scalability with hybrid

All clients receive sync

28

High Sync Rate

Test with high sync rate

System maintains sync

29

Low Sync Rate

Test with low sync rate

System maintains sync

30

High Announce Rate

Test with high announce rate

System maintains sync

31

Low Announce Rate

Test with low announce rate

System maintains sync

32

High Delay Req Rate

Test with high delay req rate

System maintains sync

33

Low Delay Req Rate

Test with low delay req rate

System maintains sync

34

High Latency

Test under high network latency

System maintains sync

35

Packet Loss

Test under packet loss

System maintains sync

36

Jitter

Test under jitter

System maintains sync

37

Clock Drift

Test with clock drift

System compensates

38

Clock Offset

Test with clock offset

System compensates

39

Asymmetric Delay

Test with asymmetric delay

System compensates

40

Network Congestion

Test under congestion

System maintains sync

41

Redundant Masters

Test failover with backups

System switches to backup

42

Master Failure

Test behavior on master failure

System elects new master

43

Boundary Clock Failure

Test on boundary clock failure

Sync rerouted

44

Transparent Clock Failure

Test on transparent clock failure

Sync rerouted

45

Slave Clock Failure

Test on slave failure

Others unaffected

46

Dynamic Join

New clients join network

New clients sync correctly

47

Dynamic Leave

Clients leave network

Remaining clients unaffected

48

Topology Change

Network topology changes

System adapts and syncs

49

Time Source Change

Switch to new time source

System syncs to new source

50

Profile-Based Scaling

Test with different profiles

System scales per profile

  • Reference links