| The IEEE1588 referred in this thesis is a very important and useful standard for time synchronization of Ethernet. It was developed by Agilent Lab initially and got supported by IEEE then. IEEE1588 is able to make the accuracy of time synchronization as microsecond-level or even nanosecond-level at best.The Precision Time Protocol is an efficient and stable protocol defined by IEEE1588. The packets transmit timestamp in Ethernet frame to synchronize by this protocol. It uses both software and hardware to make the timestamp much more accurate so that the latency of time synchronization can be satisfied.This thesis introduces PTP defined by IEEE1588, including the definition of PTP subdomain, PTP clocks, PTP ports and PTP frame. It also illustrates the principle and operation of synchronization in PTP. Furthermore, an implementation is given in this thesis. It combines switch chip which supports PTP with C programming based on Linux. Through the debugging result, PTP is advanced in time synchronization. |