The ptp device-type command configures the device type of a PTP device.
The undo ptp device-type command cancels the setting of the device type of a PTP device.
By default, the device type is not configured on a PTP device.
ptp device-type { bc | oc | e2etc | e2etcoc | p2ptc | p2ptcoc | tcandbc | t-bc } slot slot-id
undo ptp device-type slot slot-id
After G.8275.1 is enabled, only the t-bc parameter is supported.
Parameter |
Description |
Value |
---|---|---|
oc |
Indicates the ordinary clock (OC). An OC device has only one interface in the PTP domain, through which the local clock synchronizes with the upstream clock or advertises the time to the downstream clock. |
- |
bc |
Indicates the boundary clock (BC). A BC device has multiple interfaces in the PTP domain. One of these interfaces synchronizes time from the upstream device, and the other interfaces advertise the time to the downstream device. |
- |
e2etc |
Indicates the end to end transparent clock (E2ETC). A TC device does not participate in the calculation of the PTP clock and only transparently transmits PTP packets. |
- |
p2ptc |
Indicates that the peer to peer transparent clock (P2PTC). |
- |
e2etcoc |
Indicates the end to end transparent ordinary clock (E2ETCOC). A TCOC device is a special TC node. It synchronizes time in the same way as a TC device and can synchronize the clock frequency with the upstream device according to PTP packets. |
- |
p2ptcoc |
Indicates the peer to peer transparent ordinary clock (P2PTCOC). |
- |
tcandbc | Indicates the transparent boundary clock. |
- |
t-bc | Indicates the telecom boundary clock. | - |
slot slot-id | Specifies the ID of the slot where the PTP device resides. | The value range depends on the device configuration. |
Usage Scenario
Each device can be configured with only one device type.
The PTP functions and parameters are not affected when you change the device type of the device. The device supports the following functions to simplify the configuration:
The PTP functions and parameters are not affected when you change the device type of the device. Before changing the device type, make sure that the conditions of the new device type are met. For example:
To change the device type from BC or TCandBC to OC, make sure that the conditions of the OC are met, that is, PTP is enabled on only one interface. Otherwise, the following error information is displayed:
To change the device type from OC to BC, make sure that the device is not in slave-only state. Otherwise, the following error information is displayed:
To change the device type from E2ETCOC or P2PTCOC to E2ETC or PTPTC, make sure that no PTP-related configuration exists on the OC interface of the TCOC device. Otherwise, the following error information exists:
If the original device type is TCandBC and the type of an interface is set to TC, when you switch the device type to OC or BC, the following error information is displayed:
If the original device type is E2ETC or P2PTC, you can switch the device type to only E2ETCOC, or P2PTCOC. Otherwise, the following error information is displayed:
You set the device type of the PTP device and enable PTP on the device in a random sequence.
Precautions
Running the undo ptp device-type command will clear the PTP configuration in the interface view. If the PTP device type is OC and the ptp slaveonly slot slot-id command is configured, running the undo ptp device-type command will also clear the ptp slaveonly slot slot-id command configuration. Exercise caution when running the undo ptp device-type command.