ptp virtual-clock-id

Function

The ptp virtual-clock-id command configures a virtual clock ID on a PTP device.

The undo ptp virtual-clock-id command restores the default clock ID and deletes the configured virtual clock ID.

A clock ID is an 8-byte hexadecimal MAC address with "fffe" padded between the sixth and seventh bits. For example, a system has a MAC address 111122223333, and the default clock ID of the system is 111122fffe223333.

By default, a PTP device has only a default clock ID.

Format

ptp virtual-clock-id clock-id-value

undo ptp virtual-clock-id

Parameters

Parameter Description Value
clock-id-value

Specifies the four least significant bytes of a virtual clock ID. A system automatically assigns the four most significant bytes of a virtual clock ID.

The value ranges from 00000000 to ffffffff, in hexadecimal notation.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
clksync write

Usage Guidelines

Usage Scenario

A clock ID uniquely identifies a PTP device in a single clock domain. The default clock ID is determined by the system MAC address.

The default clock ID remains even if the active main board (AMB)/standby main board (SMB) switchover is performed or the AMB is replaced. If an AMB or IPU is removed from a device and installed in another device, the clock IDs of the two devices are the same. To address this problem, run the ptp virtual-clock-id command to set a virtual clock ID for either of the two devices. The configured virtual clock ID also uniquely identifies the PTP device and does not change even if the AMB is replaced.

Prerequisites

PTP has been enabled on the device using the ptp enable command.

In VS mode, this command is supported only by the admin VS.

Example

# Set the four least significant bytes of the virtual clock ID on the PTP device to 00000123.
<HUAWEI> system-view
[~HUAWEI] ptp virtual-clock-id 00000123
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >