What is clocking?
Clocking is a critical part of all digital audio systems. A device's clock is the part that ensures that audio plays back in time and at the correct speed. Think of it as a metronome for the audio samples. When multiple digital audio devices are connected together, they all need to share a common reference to make sure that audio is captured and played back in sync. Dante achieves this using the Precision Time Protocol, which is also known as PTPv1 or IEEE1588-2002.
How does clocking work in a Dante network?
In a Dante network, one device is assigned the role of Primary Leader Clock, and the rest of the devices will synchronize their internal clock to the Primary Leader Clock. This device can either be elected automatically by way of the PTP protocol, or it can be manually selected by a user in Dante Controller.
Unless a network has hundreds of devices, any Dante device can serve as the Primary Leader Clock without any performance penalty. It's best to select a stable device which is unlikely to be rebooted or turned off as the Primary Leader Clock to avoid audio glitches on the network if the Primary Leader Clock role is transferred to a new device.
The Primary Leader Clock does not need to be synchronized to any particular real-world time source, such as GPS. All that matters is that the device can maintain precise time over long periods, like a good wristwatch does. This ensures that audio is always captured and played back accurately. All Dante devices have dedicated chips on board to handle this task.
Each Unicast Dante Flow, or audio stream, consists of four channels of audio. Each UDP packet contains 32 samples of audio for each of the four channels (when there are fewer than four channels, the rest are sent as silence). Each Dante Transmitter embeds the "current" time (per the Primary Leader Clock) into each packet of audio it generates. This is the time that the particular packet of audio was captured. Each receiver guarantees a specific amount of latency (usually 1 millisecond), and so with an accurate clock and a packet timestamp, the receiver can play back audio from multiple sources exactly in sync. This buffer can be adjusted in Dante Controller for some devices.
How does clocking work when using AES67 Flows?
AES67 uses PTPv2 (IEEE1588-2008) as its clocking standard. PTPv2 can coexist on the same network with PTPv1. If you are using AES67 on your Shure devices, the device selected as the Dante Primary Leader Clock will try to become the AES67 (PVPv2, or v2) Primary Leader Clock as well. The only time this may not be the case is when a high-precision clock source is in use. In this case, the Dante Primary Leader Clock will synchronize to the high-precision clock. See the Advanced Clocking section below for more information on these cases.
Dante Multicast Flows and AES67 Flows are assembled in the same way as Dante unicast flows, although the number of samples and channels per packet can vary.
Clocking Problems and Remedies
The PTP clock protocol relies on Multicast IP traffic to communicate among devices on a Dante network. It also assumes that Ethernet switches will consistently pass the clock packets to their destination immediately upon receiving one. If clocking is not functioning correctly, Dante Controller may report that multiple devices are all attempting to act as the Primary Leader Clock or that the Primary Leader Clock is unknown, or devices may randomly mute and unmute. The most common cause of these issues is that devices can't see all of the traffic in the PTP multicast group (224.0.1.129). If you are experiencing any of these issues, first verify that the switches at your site are not on our list of disqualified network switches, and replace them if they are disqualified.
Some common network types and clock problem remedies are listed below.
Single Unmanaged Network Switch
- Ensure the switch does not feature Energy Efficient Ethernet (EEE, IEEE 802.3az, or Green Ethernet).
- Power cycle the switch.
- Update the firmware on all Shure equipment to the latest version.
- Try replacing the switch with a known good network switch.
Single Managed Network Switch
- Power cycle the switch.
- Verify that the switch settings are configured correctly (see Dante Networks and IGMP Snooping). In particular, ensure IGMP Snooping is enabled and the querier is running. If video is present, verify QOS settings.
- Update the firmware on all Shure equipment to the latest version.
- Try replacing the switch with a known good network switch.
Multiple Managed Network Switches, Connected Together
- Verify that the switch settings are configured correctly (see Dante Networks and IGMP Snooping).
- Ensure that only one switch is running the IGMP querier.
- Verify that the non-querier switches recognize the port connected to the querier switch as a multicast router port.
- Break the network apart, and verify that each switch's mini-network behaves properly on its own.
In some cases, it may be necessary to isolate Dante Clock traffic to a small network. This addresses how to do this: How do I isolate Dante traffic?
Advanced Clocking Information
PTP In Depth
PTP is a network protocol developed by the IEEE which allows devices on an IP network to synchronize to a single Leader clock. On a well-behaved network, PTP allows for sub-millisecond time agreement between devices. There are two versions of PTP commonly in use: PTPv1 (IEEE1588-2002) and PTPv2 (IEEE1588-2008). Both PTPv1 and PTPv2 coexist on the same network. In most cases, one device will act as a Boundary clock, and keep both protocols in lock-step.
The AES67 network audio standard specifies PTPv2 (also known as IEEE1588-2008) as its clocking and synchronization protocol, while the Dante standard specifies PTPv1 as its clocking and synchronization protocol. Dante-based audio devices will use PTPv1 to synchronize with a Leader clock, even when operating in AES67 mode. If there is a higher prevision PTPv2 clock on a network, then one Dante device will synchronize to the higher-precision PTPv2 clock and act as a Boundary clock for PTPv1 devices. Shure recommends allowing a single Shure device to act as the Leader clock for both PTPv1 and PTPv2 clients (if an MXWAPT is on the network, it must be the Primary Leader Clock).
PTP uses Multicast network traffic to communicate on a network. UDP messages are sent to multicast group 224.0.1.129, which all devices on a network join in order to synchronize. The PTPv2 Primary Leader Clock sends out multiple Announce messages to let devices on the network know that the Primary Leader Clock is the clock to synchronize to. The PTPv1 Primary Leader Clock includes the Announce information in its regular Sync messages.
In both PTPv1 and PTPv2, the Primary Leader Clock (or a Boundary clock, when multiple clocking domains are joined) sends out multiple Sync and Follow_Up messages per second, which propagate to all devices on the network segment. These messages are used to determine the time it takes for packets to make it from the clock to the device. Devices also periodically send Delay_Request messages, to the Primary Leader Clock, with replies with Delay_Response messages. These messages are used to determine the time it takes for packets to make it from the device back to the clock. Devices take the average of these, and use it to bring their own internal clock into alignment with the time sent by the Primary Leader Clock.
Timing accuracy with PTP is directly related to the accuracy and stability of the Leader Clock. The Leader Clock is a device on a network which has been elected to this role through an election process defined in the PTP standard. The algorithm takes into account the device's reported stability and accuracy, and breaks ties based on the MAC address of the devices tied for eligibility. In some networks, such as in television facilities or cellular networks, a Leader Clock with GPS-synchronized time is necessary for equipment to function correctly. This is generally not required for Dante or AES67 networks in most situations. Devices which are not GPS-disciplined are generally referred to as Arbitrary Clocks, and all that is required is that the device can generate time that meet the specifications set forth in AES11.
Clock Election
This flowchart explains how the Leader Clock is elected on a Dante network: