The invention discloses a method and device for realizing a one-step mode of a precise
time protocol message, and a storage medium; the method comprises the steps: recording the message time; then identifying the PTP message, judging whether the PTP message is a one-step message or not, if the PTP message is the one-step message in the receiving direction, storing an arrival
timestamp, and storing the arrival
timestamp of the message in a register in a
PHY; then in the transmitting direction, reading the arrival
timestamp of the message and calculating the
residence time by using the departure timestamp and the arrival timestamp, and then modifying the correction domain field of the PTP message by using the
residence time. According to the invention, the
PHY records the entering and departure time of the message at the MDI, and the correction domain of the PTP message is modified while forwarding; therefore, the one-step mode
processing of the PTP message on the TC is realized, and the time
delay error on the
PHY is eliminated; besides, the upper layer module does not need to participate in
processing of the PTP message forwarded by the local TC, so that the implementation difficulty of the TC is simplified. Meanwhile, extra network bandwidth occupation in a two-step mode is avoided, and the development and maintenance cost of the product is also reduced.