A clock synchronization method, wherein the method comprises: receiving (S301), by a network device, a first announce message from a first master clock node and a second announce message from a second master clock node, wherein the first announce message carries a first identifier of a first clock source node and a first maximum clock deviation accumulated value, and the second announce message carries a second identifier of a second clock source node and a second maximum clock deviation accumulated value, wherein the first maximum clock deviation accumulated value is a sum of a plurality of first maximum clock deviations on a path from the first clock source node to the first master clock node, and the second maximum clock deviation accumulated value is a sum of a plurality of second maximum clock deviations on a path from the second clock source node to the second master clock node; comparing, by the network device, the identifier of the first clock source node with the identifier of the second clock source node; when the first identifier is the same as the second identifier, selecting (S303), by the network device from the first master clock node and the second master clock node based on the first maximum clock deviation accumulated value and the second maximum clock deviation accumulated value, the master clock node for performing clock synchronization; and calibrating (S304), by the network device, a clock of the network device based on time information of the selected master clock node, wherein the network device communicates with the master clock node according to IEEE1588-2008 by using a PTP message. receiving (S301), by a network device, a first announce message from a first master clock node and a second announce message from a second master clock node, wherein the first announce message carries a first identifier of a first clock source node and a first maximum clock deviation accumulated value, and the second announce message carries a second identifier of a second clock source node and a second maximum clock deviation accumulated value, wherein the first maximum clock deviation accumulated value is a sum of a plurality of first maximum clock deviations on a path from the first clock source node to the first master clock node, and the second maximum clock deviation accumulated value is a sum of a plurality of second maximum clock deviations on a path from the second clock source node to the second master clock node; comparing, by the network device, the identifier of the first clock source node with the identifier of the second clock source node; when the first identifier is the same as the second identifier, selecting (S303), by the network device from the first master clock node and the second master clock node based on the first maximum clock deviation accumulated value and the second maximum clock deviation accumulated value, the master clock node for performing clock synchronization; and calibrating (S304), by the network device, a clock of the network device based on time information of the selected master clock node, wherein the network device communicates with the master clock node according to IEEE1588-2008 by using a PTP message. <EOS>