No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S12700 V200R013C00 Command Reference

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
PTP Configuration Commands

PTP Configuration Commands

Command Support

Commands provided in this section and all the parameters in the commands are supported by all switch models by default, unless otherwise specified. For details, see specific commands.

display ptp

Function

The display ptp command displays information about the Precision Time Protocol (PTP).

Format

display ptp all [ config | state ] [ chassis chassis-id ]

display ptp interface interface-type interface-number

Parameters

Parameter

Description

Value

all

Displays all the statistics of a PTP device, such as the global configuration parameters, status of the Building Integrated Timing Supply (BITS), interface where the clock source resides, time trace status, and interface running status.

-

config

Displays configurations of all the modules related to PTP on the device.

-

state

Displays the running status of the protocol on all the modules related to PTP on the device.

-

chassis chassis-id

Specifies a chassis ID. This parameter is available only when the CSS function is enabled.

The value is 1 or 2.

interface interface-type interface-number

Displays the BMC running status and the number of sent and received PTP packets on a specified interface.
  • interface-type specifies the type of an interface.

  • interface-number specifies the number of an interface.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

Using the display ptp command, you can view the running status of PTP and statistics information about the global configuration parameters, status of the BITS, interface where the clock source resides, and clock lock status. In addition, the command also displays the grandmaster clock ID, receiver number, parent clock ID, parent port number, statistics, and status of interfaces or role list.

Precautions

The display ptp displays the configuration on the interface only when PTP is enabled globally and in the interface view.

Example

# Display the status and statistics of all the modules related to PTP.

  • The slave clock
    <HUAWEI> display ptp all
      Device config info
      ------------------------------------------------------------------
      PTP state         :enabled    Domain  value      :0
      Slave only        :no         Device type        :TCANDBC
      Static BMC        :no         Local clock ID     :00259e3200000123
      PTP freq-sync     :no         Time lock success  :no                                                                              
      PTP acl           :yes                                                                                                            
      Permit clockid                                                                                                                    
      ----------------------------------------------------------------------                                                            
      0000000000000123  0000000000123fff                                                                                  
    
      BMC run info
      ------------------------------------------------------------------
      Grand clock ID    :000112fffe345678
      Receive number    :GigabitEthernet1/0/3
      Parent clock ID   :000112fffe345678
      Parent portnumber :2049
      Priority1         :0          Priority2          :128
      Step removed      :1          Clock accuracy     :32
      Clock class       :6          Time Source        :32
      UTC Offset        :0          UTC Offset Valid   :False
      Time Scale        :ARB        Time Traceable     :True
      Leap              :None       Frequence Traceable:True
    
      Port info
      Name                  State        Delay-mech Ann-timeout Type Domain
      ------------------------------------------------------------------------
      GigabitEthernet1/0/3  slave        delay      9           BC   200
    
      Clock source info
      Clock Pri1 Pri2 Accuracy Class TimeSrc Signal Switch Direction In-Status
      ------------------------------------------------------------------------
      local 128  128  0x31     187   0xa0     -      -      -         -
      bits0 128  128  0x20       6   0x20     none   off   -/-        abnormal
      bits1 128  128  0x20       6   0x20     none   off   -/-        abnormal
  • The master clock
    <HUAWEI> display ptp all
      Device config info
      ------------------------------------------------------------------
      PTP state         :enabled    Domain  value      :0
      Slave only        :no         Device type        :TCANDBC
      Static BMC        :no         Local clock ID     :00259e3200000123
      PTP freq-sync     :no         Time lock success  :no                                                                              
      PTP acl           :yes                                                                                                            
      Permit clockid                                                                                                                    
      ----------------------------------------------------------------------                                                            
      0000000000000123  0000000000123fff                                                                                  
    
      BMC run info
      ------------------------------------------------------------------
      Source port       :bits1
      Leap              :None
      UTC Offset        :0
      UTC Offset Valid  :False
    
      Port info
      Name                  State        Delay-mech Ann-timeout Type Domain
      ------------------------------------------------------------------------
      GigabitEthernet2/0/1  master       delay      9           BC   200
    
      Clock source info
      Clock Pri1 Pri2 Accuracy Class TimeSrc Signal Switch Direction In-Status
      ------------------------------------------------------------------------
      local 128  128  0x31     187   0xa0     -      -      -         -
      bits0 128  128  0x20       6   0x20     none   on    -/-        abnormal
      bits1 128  128  0x20       6   0x20     none   on    -/-        abnormal

# Display PTP interface status and packet statistics of XGigabitEthernet1/0/3.

<HUAWEI> display ptp interface xgigabitethernet 1/0/3
Port State :master

  Recv Packet Statistics
  -----------------------------------------------------------------------
  Announce Packet        :0          Sync Packet               :0
Table 3-198  Description of the display ptp command output

Item

Description

Device config info

PTP state

Whether PTP is enabled.

The value is set through the ptp enable (system view) command.

Domain value

Domain that the PTP clock belongs to.

The value is set through the ptp domain command.

Slave only

Whether the slave only mode is adopted.

The value is set through the ptp slaveonly command.

Device-type

Type of the PTP device.

The value is set through the ptp device-type command.

Static BMC

Whether the static BMC algorithm is used.

Time lock success

Whether the device time is locked.

Local clock ID

ID of the local clock.

The value is set through the ptp virtual-clock-id command.

PTP freq-sync

Whether the system is enabled to synchronize the clock frequency through PTP packets.

The value is set through the clock source ptp synchronization enable command.

PTP acl

Whether access control of the clock source is enabled.

Permit clockid

ID of the master clock source add to the clock source whitelist.

BMC run info

Grand clock ID

ID of the grandmaster clock.

Receive number

Interface that receives signals of the clock source.

Parent clock ID

ID of the parent clock.

Parent portnumber

Interface that sends signals of the parent clock source.

Priority1

Priority1 of the clock source obtained from the master clock.

Priority2

Priority2 of the clock source obtained from the master clock.

Step removed

Number of communication channels between the local clock and the grandmaster clock, that is, number of BC devices.

Clock-accuracy

Accuracy of the clock source, which is obtained from the master clock.

Clock-class

Class of the clock source, which is obtained from the master clock.

Time Source

Time source of the clock source, which is obtained from the master clock.

UTC Offset

Offset between the Universal Time Coordinated (UTC) and International Atomic Time (TAI).

The value is obtained from the master clock. If the clock source is selected for the BITS clocks, the value is set through the ptp utc-offset utc-offset command.

UTC Offset Valid

Whether the UTC offset takes effect.

Time Scale

Time scale used by the PTP clock. The PTP protocol supports two types of time scales:
  • ARB
  • PTP

Time Traceable

Whether the time can be traced.

Leap

Value used to tune the utc-offset. PTP supports two leap values: leap59 and leap61. The value is set by the ptp { utc-offset | leap59 | leap61 } command.

Frequence Traceable

Whether the clock frequency can be traced.

Source port

Clock source of the master clock.

Port info

Name

Name of the interface enabled with PTP.

State

Status of the interface enabled with PTP:
  • Faulty: indicates that the interface is faulty.
  • Listening: indicates that the interface is being monitored.
  • Master: indicates that the interface is a master interface.
  • Passive: indicates that the interface is a passive port.
  • Premaster: indicates that the interface is a standby master interface.
  • Slave: indicates that the interface is a slave interface.

Delay-mech

Delay measurement mechanism used on an interface.

The value is set through the ptp delay-mechanism command.

Ann-timeout

Timeout interval for waiting the Announce message.

The value is set through the ptp announce-receipt-timeout command.

Type

Type of an interface, which is usually the same as the type of the device. If the device type is TCandBC, the value is set through the ptp port-type command.

Domain

The clock domain of an interface should be the same as the device type. If the device type is TCandBC, the clock domain of the interface is set by the ptp domain command.

Clock source info

Clock

Clock source.

Pri1

Priority1 of the clock source. The value is set through the ptp clock-source command.

Pri2

Priority2 of the clock source. The value is set through the ptp clock-source command.

Accuracy

Accuracy of the clock source. The value is set through the ptp clock-source command.

Class

Class of the clock source. The value is set through the ptp clock-source command.

TimeSrc

Time source of the clock source. The value is set through the ptp clock-source command.

Signal

Time type used by the BITS clock source. A BITS clock can use the 1 pulse per second (PPS) time or DC Level Shifter (DCLS) time. The value is set through the clock bits-type command.

Switch

Whether the BITS clock source participates in clock source selection. The value is set through the ptp clock-source on | off command.

Direction

Transmission direction of signals of the BITS clock source. The value is set through the clock bits-type command.

In-Status

Whether the clock source is normal.

Port State

Port state.

Recv Packet Statistics

Received packet statistics.

display ptp utc

Function

The display ptp utc command displays the Universal Time Coordinated (UTC) time.

Format

display ptp utc [ chassis chassis-id ]

Parameters

Parameter

Description

Value

chassis chassis-id

Specifies a chassis ID. This parameter is available only when the CSS function is enabled.

The value is 1 or 2.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

UTC is also called the Greenwich Mean Time (GMT). The time displayed on the PTP device must be the UTC time.

The command is used to view the synchronization status of the UTC time. After two devices are synchronized, the UTC time should be the same.

The PTP supports two types of time scales: ARB and PTP.
  • When the ARB time scale is used, the time can start from any time point and be reset by the management process. The slave clock obtains only the offset between the UTC time and TAI time in seconds. Therefore, the ARB time scale is used only to transmit the offset of the PTP time.
  • When the PTP time scale is used, the system time is the UTC time adjusted according to utc-offset.

    The origin of the PTP time scale is 00:00:00 of January 1, 1970. The formula for converting the TAI time to the UTC time is: UTC = TAI - utc-offset. The utc-offset parameter indicates the accumulated offset between the current UTC and the TAI.

Example

# Display the UTC time.

<HUAWEI> display ptp utc
Non-UTC Time:2009-12-30  20:43:39 
Table 3-199  Description of the display ptp utc command output

Item

Description

Non-UTC Time

Non-standard UTC time converted according to the ARB time.

ptp acl enable

Function

The ptp acl enable command enables access control of the clock source.

The undo ptp acl enable command disables access control of the clock source.

By default, access control of the clock source is disabled.

Format

ptp acl enable

undo ptp acl enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a PTP network is large, a large number of devices may participate in dynamic clock source selection. To prevent clock flapping over the entire network due to malicious clock attacks or incorrect configurations, you can run the ptp acl enable command to enable access control of the clock source. The device then selects the clock source only from the clock source whitelist.

To configure the clock source whitelist, run the ptp acl-permit-clockid command.

Precautions

If the previous master clock source of the device is not within the clock source whitelist, the device does not synchronize with this master clock source after access control of the clock source is enabled.

Example

# Enable access control of the clock source.

<HUAWEI> system-view
[HUAWEI] ptp acl enable

ptp acl-permit-clockid

Function

The ptp acl-permit-clockid command adds a specified master clock source to the clock source whitelist.

The undo ptp acl-permit-clockid command deletes a specified master clock source from the clock source whitelist.

By default, no clock source whitelist is configured.

Format

ptp acl-permit-clockid clockid-value

undo ptp acl-permit-clockid clockid-value

Parameters

Parameter Description Value
clockid-value Specifies a clock ID. The value ranges from 0 to FFFFFFFFFFFFFFFF in hexadecimal notation.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

If a PTP network is large, a large number of devices may participate in dynamic clock source selection. To prevent clock flapping over the entire network due to malicious clock attacks or incorrect configurations, you can enable access control of the clock source. The device then selects the clock source only from the clock source whitelist.

To configure the clock source whitelist, run the ptp acl-permit-clockid command. On a device, the clock source whitelist contains at most 64 clock IDs. The value of clockid-value is the same as the value of the Local clock ID field in the display ptp all command output.

Example

# Add the clock source 123FFF to the clock source whitelist.

<HUAWEI> system-view
[HUAWEI] ptp acl-permit-clockid 123FFF

ptp announce-drop enable

Function

The ptp announce-drop enable command configures the interface of the PTP device to discard Announce messages.

The undo ptp announce-drop enable command restores the default mode of processing Announce messages on the interface of the PTP device.

By default, Announce messages are not discarded.

Format

ptp announce-drop enable

undo ptp announce-drop enable

Parameters

None.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Announce messages are advertisement messages in PTP, which are used to establish the master-slave hierarchy between devices. If the interface discards Announce messages, the device where the interface resides cannot receive clock synchronization information from other PTP devices. Usually, the ptp announce-drop enable command is configured on the interface at the user side to prevent the interface from receiving and processing Announce messages. This saves system resources.

Example

# Configure the mode of processing Announce messages on XGigabitEthernet1/0/1 of the PTP device to discard.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp announce-drop enable

ptp announce-interval

Function

The ptp announce-interval command sets the interval for sending Announce packets on an interface of the PTP device.

The undo ptp announce-interval command restores the default interval for sending Announce packets on the interface of the PTP device.

By default, the interval for sending Announce packets is 128 ms.

Format

ptp announce-interval announce-interval

undo ptp announce-interval

Parameters

Parameter

Description

Value

announce-interval

Indicates that the interval for sending Announce packets on the interface is set to the nth power of 2 in milliseconds, where n is specified by announce-interval.

The value is an integer that ranges from 0 to 20.

By default, the interval is 7 (128 ms).

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Announce messages are advertisement messages in PTP, which are used to establish the master-slave hierarchy between devices. Announce packets ensure the exchange of clock synchronization information between PTP devices. If the value of the announce-interval is too small, devices frequently exchange PTP packets, which consume excessive bandwidth; if the value of the announce-interval is too great, the clock synchronization accuracy cannot be guaranteed. Therefore, while the clock synchronization accuracy is ensured, you should set the announce-interval to a larger value.

When the ptp announce-receipt-timeout timeout-value command is run to configure the timeout period for the peer device to receive Announce packets, the interval for sending Announce packets configured on the local interface must be less than the timeout period for receiving Announce packets configured on the peer interface. Typically, the former interval is set to 1/4 of the latter interval. That is, the value of announce-interval is less than the value of timeout-value by 2.

Example

# Set the interval for sending Announce packets on XGigabitEthernet1/0/1 of the PTP device to 256 ms.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp announce-interval 8

ptp announce-receipt-timeout

Function

The ptp announce-receipt-timeout command sets the timeout interval for an interface to receive Announce messages from the peer device.

The undo ptp announce-receipt-timeout command restores the default timeout interval for an interface to receive Announce messages from the peer device.

By default, the timeout period for receiving Announce messages is 512 ms.

Format

ptp announce-receipt-timeout timeout-value

undo ptp announce-receipt-timeout

Parameters

Parameter

Description

Value

timeout-value

Indicates that the timeout interval for receiving Announce messages on an interface is set to the nth power of 2 in milliseconds, where n is specified by timeout-value.

The value is an integer that ranges from 0 to 20.

By default, the interval is 9 (512 ms)

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Announce messages are advertisement messages in PTP, which are used to establish the master-slave hierarchy between devices. When the interval for receiving Announce messages is greater than the timeout interval for receiving Announce messages, the local device sets the interface status of the PTP device to Master and does not synchronize the clock with other devices.

To ensure that the peer device can correctly receive Announce messages, the value of timeout-value must be greater than the value of announce-interval. Generally, the value of timeout-value is four times greater than the value of announce-interval. That is, the value of timeout-value is 2 greater than the value of announce-interval.

Example

# Set the timeout interval for receiving Announce messages on GigabitEthernet1/0/1 of the PTP device to 1 second.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] ptp announce-receipt-timeout 10

ptp asymmetry-correction

Function

The ptp asymmetry-correction command sets the delay offset value to ensure accurate time synchronization.

The undo ptp asymmetry-correction command restores the default delay offset.

By default, the asymmetry correction value of the PTP packet sent from the interface is not configured.

Format

ptp asymmetry-correction { positive | negative } asymmetry-correction

undo ptp asymmetry-correction

Parameters

Parameter

Description

Value

positive asymmetry-correction

Indicates the positive asymmetry correction value.

The value is an integer that ranges from 0 to 2000000, in ns. The default value is 0.

negative asymmetry-correction

Indicates the negative asymmetry correction value.

The value is an integer that ranges from 0 to 2000000, in ns. The default value is 0.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

In case of path delay calculation, PTP measures the packet sending path only and considers the delays for sending and receiving packets as the same by default.

If the two delays are different or asymmetric, you need to configure an asymmetry correction value. In this case, the device automatically considers the asymmetry correction value in the path delay calculation complying with the Pdelay or Delay measurement mechanism.

Example

# Set the delay offset value to 1 ns on XGigabitEthernet 1/0/1.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp asymmetry-correction positive 1
Related Topics

ptp bits-1pps | bits-dcls

Function

The ptp { bits-1pps | bits-dcls } command sets the correction for the delay of sending or receiving BITS clock signals.

The undo ptp { bits-1pps | bits-dcls } command cancels the correction for delay in sending or receiving BITS clock signals.

By default, no correction is added to the delay in sending or receiving BITS clock signals.

Format

ptp { bits-1pps | bits-dcls } { receive-delay receive-delay | send-delay send-delay } [ chassis chassis-id ]

undo ptp { bits-1pps | bits-dcls } { receive-delay | send-delay } [ chassis chassis-id ]

Parameters

Parameter

Description

Value

bits-1pps

Indicates the 1 pps time of day (TOD) of the BITS clock.

-

bits-dcls

Indicates the DC Level Shifter (DCLS) time of the BITS clock.

-

receive-delay receive-delay

Sets the correction for the delay of receiving BITS clock signals.

The value is an integer that ranges from 0 to 2000000, in ns.

send-delay send-delay

Sets the correction for the delay of sending BITS clock signals.

The value is an integer that ranges from 0 to 1600, in ns.

chassis chassis-id

Specifies a chassis ID. This parameter is available only when the CSS function is enabled.

The value is 1 or 2.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

When the cable between the BITS interfaces and grandmaster clock is long, the transmission time of clock signals may affect the best clock source selection of the PTP system. You need to set the correction time to the transmission delay of BITS clock signals. When setting the transmission delay on a BITS cable, you can set the correction of the sending delay on the sender or set the correction of the receiving delay on the receiver. The correction range on the sender is larger than that on the receiver. You can set the correction according to the experience data.

When setting the correction of the transmission delay, you need to specify the time type but do not need to specify the BITS interface. The time type indicates the encapsulation format of clock signals in packets. The device supports two time types: bits–1 pps (Time of Day) and DCLS (DC Level Shifter).

Example

# Set the correction for the delay in receiving 1 pps time signals to 2 ns.

<HUAWEI> system-view
[HUAWEI] ptp bits-1pps receive-delay 2 

ptp clock-source

Function

The ptp clock-source command sets the attributes of the clock source and time source.

The undo ptp clock-source command cancels the settings.

For default values of the parameters, see the parameter description.

Format

ptp clock-source { local | bits0 | bits1 } { clock-accuracy clock-accuracy | clock-class clock-class | priority1 priority1 | priority2 priority2 | time-source time-source } [ chassis chassis-id ]

undo ptp clock-source { local | bits0 | bits1 } { clock-accuracy | clock-class | priority1 | priority2 | time-source } [ chassis chassis-id ]

Parameters

Parameter

Description

Value

local

Indicates the local clock.

-

bits0

Indicates the first BITS clock, BITS0.

-

bits1

Indicates the second BITS clock, BITS1.

-

clock-accuracy clock-accuracy

Specifies an attribute defining the accuracy of a clock.

The value of clock-accuracy is a hexadecimal number that is in the range of 0 to FF. You can set the value to 20-31 or 80-FD.

The default accuracy of the local clock is 31.

The default accuracy of the BITS clock is 20.

The accuracy values mapping the values of clock-accuracy-value are as follows:

  • 20: The time is accurate to within 25 ns.
  • 21: The time is accurate to within 100 ns.
  • 22: The time is accurate to within 250 ns.
  • 23: The time is accurate to within 1 us.
  • 24: The time is accurate to within 2.5 us.
  • 25: The time is accurate to within 10 us.
  • 26: The time is accurate to within 25 us.
  • 27: The time is accurate to within 100 us.
  • 28: The time is accurate to within 250 us.
  • 29: The time is accurate to within 1 ms.
  • 2A: The time is accurate to within 2.5 ms.
  • 2B: The time is accurate to within 10 ms.
  • 2C: The time is accurate to within 25 ms.
  • 2D: The time is accurate to within 100 ms.
  • 2E: The time is accurate to within 250 ms.
  • 2F: The time is accurate to within 1s.
  • 30: The time is accurate to within 10s.
  • 31: The time is accurate to more than 10s.
  • 80 to FD: reserved for PTP features.

clock-class clock-class

Specifies the attribute of an ordinary or boundary clock denotes the traceability of the time or frequency distributed by the grandmaster clock, that is the capability to trace the International Atomic Time (TAI).

The value of clock-class is an integer that ranges from 1 to 255.

The default value of the local clock is 187.

The default value of the BITS clock is 6.

The capabilities to trace the TAI mapping the values of clock-class-value are as follows:

  • 0, 9, and 10: reserved to enable compatibility with future versions.
  • 1-5, 8, 11-12, 15-51, 53-57, 59-67, 123-127, 128-132, 171-186, 188-192, 194-215, 233-247, 249-250, 252-254: reserved.
  • 68-122, 133-170, 216-232: used by alternate PTP profiles.
  • 6: a clock that is synchronized to a primary reference time source. The timescale distributed is PTP. A clock of clockClass 6 cannot be a slave to another clock in the domain.
  • 7: a clock that has previously been designated as clockClass 6 but that has lost the capability to synchronize to a primary reference time source. The PTP system enters the holdover state and does not perform best clock source selection. The timescale distributed is PTP. A clock of clockClass 7 cannot be a slave to another clock in the domain.
  • 13: a clock that is synchronized to an application specific source of time. The timescale distributed is ARB. A clock of clockClass 13 cannot be a slave to another clock in the domain.
  • 14: a clock that has previously been designated as clockClass 13 but that has lost the capability to synchronize to an application specific source of time. The clock is in holdover mode and within holdover specifications. The timescale distributed is ARB. A clock of clockClass 14 cannot be a slave to another clock in the domain.
  • 52: Degradation alternative A for a clock of clockClass 7 that is not within holdover specification. A clock of clockClass 52 cannot be a slave to another clock in the domain.
  • 58: Degradation alternative A for a clock of clockClass 14 that is not within holdover specification. A clock of clockClass 58 cannot be a slave to another clock in the domain.
  • 187: Degradation alternative B for a clock of clockClass 7 that is not within holdover specification. A clock of clockClass 187 can be a slave to another clock in the domain.
  • 193: Degradation alternative B for a clock of clockClass 14 that is not within holdover specification. A clock of clockClass 193 can be a slave to another clock in the domain.
  • 248: This clockClass is used if none of the other clockClass definitions apply.
  • 251: Reserved for version 1 compatibility.
  • 255: clockClass of a slave-only clock.

priority1 priority1

Specifies a user configurable designation that a clock belongs to an ordered set of clocks from which a master is selected. The attribute priority1 is used in the execution of the best master clock algorithm.

The value of priority1 is an integer that ranges from 0 to 255.

The default value is 128.

Lower values take precedence.

priority2 priority2

Specifies a user configurable designation that provides finer grained ordering among otherwise equivalent clocks. The attribute priority2 is used in the execution of the best master clock algorithm.

The value of priority2 is an integer that ranges from 0 to 255.

The default value is 128.

Lower values take precedence.

time-source time-source

Specifies the source of time used by the grandmaster clock.

The value of time-source is an integer that ranges from 1 to 8.

The default value of the local clock is 8 (INTERNAL_OSCILLATOR).

The default value of the BITS clock is 2 (GPS).

The attributes mapping the values of time-source-value are as follows:

  • 1: (0x10) ATOMIC_CLOCK
  • 2: (0x20) GPS
  • 3: (0x30) TERRESTRIAL_RADIO
  • 4: (0x40) PTP
  • 5: (0x50) NTP
  • 6: (0x60) HAND_SET
  • 7: (0x90) OTHER
  • 8: (0xa0) INTERNAL_OSCILLATOR
chassis chassis-id

Specifies a chassis ID. This parameter is available only when the CSS function is enabled.

The value is 1 or 2.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The time-source parameter specifies the clock source attribute used by the grandmaster clock device and the value is set according to the clock source connected to the device.

When the BMC algorithm is used by the PTP device for master clock selection, priority1 > clock-class > clock-accuracy > priority2 of each candidate time source is compared first. If the priority1 of candidate time sources is the same, clock-class is compared, clock-accuracy and priority2. The time source with the highest priority is selected as the master clock.

A smaller clock-class value indicates a higher clock class. When the clock-class of a device is smaller than 128, the device cannot function as a slave clock. Therefore, do not set a high clock-class for a slave clock. Otherwise, the PTP interface of the slave clock cannot enter the slave state, and the device cannot synchronize with the master clock.

Example

# Configure the time source of the local clock to ATOMIC_CLOCK.

<HUAWEI> system-view
[HUAWEI] ptp clock-source local time-source 1 

# Set priority 1 of the local clock to 1.

<HUAWEI> system-view
[HUAWEI] ptp clock-source local priority1 1 

# Set priority 2 of the local clock to 1.

<HUAWEI> system-view
[HUAWEI] ptp clock-source local priority2 1 

# Set the class of the local clock to 10.

<HUAWEI> system-view
[HUAWEI] ptp clock-source local clock-class 10 

# Set the accuracy of the local clock to 31 (accurate to >10s).

<HUAWEI> system-view
[HUAWEI] ptp clock-source local clock-accuracy 31 
Related Topics

ptp clock-source on | off

Function

The ptp clock-source on command configures BITS signals to participate in best master clock (BMC) calculation.

The ptp clock-source off command disables BITS signals from participating in BMC calculation.

The undo ptp clock-source on command disables BITS signals from participating in BMC calculation.

By default, the BITS signals are not involved in BMC calculation.

Format

ptp clock-source { bits0 | bits1 } { off | on } [ chassis chassis-id ]

undo ptp clock-source { bits0 | bits1 } on [ chassis chassis-id ]

Parameters

Parameter

Description

Value

bits0

Indicates the first BITS clock, BITS0.

-

bits1

Indicates the second BITS clock, BITS1.

-

chassis chassis-id

Specifies a chassis ID. This parameter is available only when the CSS function is enabled.

The value is 1 or 2.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

When a clock synchronization network needs to receive external clock signals through a BITS device, run the ptp clock-source on | off command to configure the signals received by BITS interfaces to participate in BMC calculation.

Example

# Configure BITS0 to participate in BMC calculation.

<HUAWEI> system-view
[HUAWEI] ptp clock-source bits0 on
Related Topics

ptp clock-step

Function

The ptp clock-step command specifies the mode in which PTP packets that are used by PTP devices to perform time synchronization are timestamped.

The undo ptp clock-step command resets the mode in which PTP packets that are used by PTP devices to perform time synchronization are timestamped.

By default, the mode in which PTP packets are timestamped is one-step.

Format

ptp clock-step { one-step | two-step }

undo ptp clock-step

Parameters

Parameter

Description

Value

one-step

Indicates the one-step clock mode. In one-step clock mode, Sync messages in Delay mode and Pdelay_Resp messages in Pdelay mode are stamped with the time when they are sent.

-

two-step

Indicates the two-step clock mode. In two-step clock mode, Sync messages in Delay mode and Pdelay_Resp messages in Pdelay mode only record the time when they are generated, but carry no timestamps. The timestamps are carried in subsequent messages, that is, Follow_Up or Pdelay_Resp_Follow_Up messages.

-

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

The device adopts the one-step mode to timestamp outgoing PTP packets to communicate with other devices, and identify received Follow_Up packets in two-step mode. In this way, an interface in one-step clock mode can communicate with another interface in two-step clock mode.

Example

# Configure the two-step clock mode on XGigabitEthernet1/0/1.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp clock-step two-step

ptp delay-mechanism

Function

The ptp delay-mechanism command configures the delay measurement mechanism applied on the interface of a PTP device.

The undo ptp delay-mechanism command deletes the delay measurement mechanism applied on the interface of the PTP device.

By default, the delay measurement mechanism is only configured on the P2P transparent clock (P2PTC), E2E transparent clock (E2ETC), P2P transparent clock and ordinary clock (P2PTCOC), and E2E transparent clock and ordinary clock (E2ETCOC).

Format

ptp delay-mechanism { delay | pdelay }

undo ptp delay-mechanism

Parameters

Parameter

Description

Value

delay

Indicates that the delay measurement mechanism applied on the interface is in Delay mode.

-

pdelay

Indicates that the delay measurement mechanism applied on the interface is in Pdelay mode.

-

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

PTP supports two delay measurement mechanisms:
  • Delay request-response end to end (E2E) mechanism: calculates the time difference based on the total delay of the link between the master and slave clocks.
  • Peer delay peer to peer (P2P) mechanism: calculates the time difference based on the delay of each link between the master and slave clocks.

In the P2P mechanism, the link delay of each interface must be measured separately. Different from the E2E mechanism, the P2P mechanism calculates and accumulates the forwarding delay and link delay to ensure accurate clock synchronization. If the master and slave clocks are far from each other and there are many TCs, the P2P mechanism will greatly reduce the clock synchronization efficiency and affect the clock synchronization effect. Therefore, when there is only one or two TCs, the P2P mechanism is recommended. When there are three or more TCs, the E2E mechanism is recommended.

Precautions

  • OC and BC interfaces must be configured with the delay measurement mechanism before PTP is enabled.

  • If the delay measurement mechanism is configured on an interface, to configure another delay measurement mechanism, you need to cancel the original configuration first.

  • The corresponding delay measurement mechanism is applied on the E2ETC, E2ETCOC, P2PTC, P2PTCOC by default and cannot be modified; therefore, PTP can be directly enabled on interfaces of these devices.

Example

# Configure the mode of the delay measurement mechanism of XGigabitEthernet1/0/1 on the PTP device as Delay.

<HUAWEI> system-view
[HUAWEI] ptp device-type bc
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp delay-mechanism delay 

ptp device-type

Function

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.

Format

ptp device-type { bc | oc | e2etc | e2etcoc | p2ptc | p2ptcoc | tcandbc }

undo ptp device-type

Parameters

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.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Each device can be configured with only one device type.

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 [ chassis chassis-id ] command is configured, running the undo ptp device-type command will also clear the ptp slaveonly [ chassis chassis-id ] command configuration. Exercise caution when running the undo ptp device-type command.

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:

  • Conversion between the BC, OC, and TCandBC modes
  • Conversion between the E2ETC, P2PTC, E2ETCOC, and P2PTCOC modes

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:

NOTE:
When the device type of the device is set to TC, TCOC, or TCandBC (the interface type is TC):
  • Ensure that PTP packets are forwarded at the service layer. For example, on a ring network, you need to use ring network protocols to remove loops at the service layer.
  • On the TC device, the interfaces for receiving and sending PTP packets must be enabled with PTP. Otherwise, the resident time of the device cannot be calculated correctly. In this case, only packets are forwarded.
  • To ensure PTP time synchronization, ensure that PTP packets are first forwarded when the interface reaches the maximum rate.

You set the device type of the PTP device and enable PTP on the device in a random sequence.

Example

# Set the PTP device type to OC.

<HUAWEI> system-view
[HUAWEI] ptp device-type oc
Related Topics

ptp domain

Function

The ptp domain command configures the domain where the PTP device resides.

The undo ptp domain command restores the domain where the PTP device resides to the default value.

By default, the domain where the PTP device resides is PTP domain 0.

Format

ptp domain domain-value

undo ptp domain

Parameters

Parameter

Description

Value

domain-value

Specifies the domain that the clock source belongs to.

The value is an integer that ranges from 0 to 255.

Views

System view, Interface view

Default Level

2: Configuration level

Usage Guidelines

A physical time synchronization network can be logically divided into multiple clock domains. Each clock domain has a synchronization time, to which all devices in the domain are synchronized. Different clock domains have their own synchronization time, which is independent from each other.

The methods of configuring domains for different types of PTP devices are different.
  • When the PTP device type is not TCandBC, you can configure a domain only in the system view. If you configure a domain in the interface view.
  • When the PTP device type is TCandBC, you can configure a domain on the TC interface after configuring a domain in the system view. You cannot configure a domain on the BC interface. In this case, the BC interface uses the domain configured in the system view.

Example

# Set the value of the domain where the PTP device resides to 4.

<HUAWEI> system-view
[HUAWEI] ptp domain 4

# Set the value of the domain where the TC interface of the TCandBC resides to 4.

<HUAWEI> system-view
[HUAWEI] ptp device-type tcandbc
[HUAWEI] interface gigabitethernet 1/0/0
[HUAWEI-GigabitEthernet1/0/0] ptp port-type tc
[HUAWEI-GigabitEthernet1/0/0] ptp domain 4

ptp enable (interface view)

Function

The ptp enable command enables PTP on a certain interface of the device.

The undo ptp enable command disables PTP on a certain interface of the device.

By default, PTP is not enabled on the interface of the device.

Format

ptp enable

undo ptp enable

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

After PTP is enabled globally, enable PTP on an interface so that PTP can take effect.

Precautions

  • Before enabling PTP, ensure that the board supports PTP.

  • Before enabling PTP, ensure that the interface supports PTP.

  • Before enabling PTP, ensure that the interface works in LAN mode. To configure the working mode of an interface, run the set port-work-mode { lan | wan } command.

  • The management interface and the sub interface cannot be enabled with PTP.

Pre-configuration tasks

  • Before enabling PTP on an interface, you must run the ptp device-type command in the system view to set the device type..

  • You must use the ptp port-type command to configure the clock mode of an interface on the TCandBC device.
  • On the OC device, only one interface can be enabled with PTP.
  • On the OC or BC device, you must use the ptp delay-mechanism command to configure the delay mechanism before enabling PTP.

Example

# Enable PTP on XGigabitEthernet 1/0/1.

<HUAWEI> system-view
[HUAWEI] ptp device-type bc 
[HUAWEI] interface xgigabitethernet 1/0/1 
[HUAWEI-XGigabitEthernet1/0/1] ptp delay-mechanism delay
[HUAWEI-XGigabitEthernet1/0/1] ptp enable

ptp enable (system view)

Function

The ptp enable command enables PTP on the device.

The undo ptp enable command disables PTP on the device.

By default, PTP is disabled globally.

Format

ptp enable

undo ptp enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Before using PTP, run the ptp enable command in the system view to enable PTP globally.

The undo ptp enable command will disable PTP and make all the PTP configuration become ineffective. To use PTP, reconfigure PTP.

Example

# Enable PTP globally.

<HUAWEI> system-view
[HUAWEI] ptp enable

ptp mac-egress

Function

The ptp mac-egress command configures the MAC encapsulation mode for the PTP packets.

The undo ptp mac-egress command restores the default MAC encapsulation mode.

By default, PTP packets are encapsulated in MAC multicast mode and do not carry any VLAN tag.

Format

ptp mac-egress { destination-mac destination-mac | vlan vlan-id [ priority priority-value ] }

undo ptp mac-egress { destination-mac | vlan [ priority ] }

Parameters

Parameter

Description

Value

destination-mac destination-mac

Indicates the destination MAC address of the PTP packet.

If the destination MAC address is not configured, the PTP packet is encapsulated in multicast mode by default and does not carry any VLAN tag.

The value is in the format of H-H-H. An H contains one to four hexadecimal numbers.

vlan vlan-id

Specifies the VLAN ID of PTP messages.

The value is an integer that ranges from 1 to 4094.

priority priority-value

Specifies the priority of VLAN packets.

The value is an integer that ranges from 0 to 7. The default value is 7, indicating the highest priority.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

You can configure the encapsulation mode for packets based on the Layer 2 network types of devices. If a device resides on a Layer 2 unicast network, configure a MAC address for the device. If a device resides on a multicast network, no MAC address needs to be configured for the device because a default multicast MAC address is defined.

Table 3-200  Default multicast MAC address for delay and Pdelay measurement mechanisms
Packet Type MAC Address

All except peer delay measurement mechanisms

011B-1900-0000

Peer delay measurement mechanism

0180-C200-000E

Precautions

  • This command is invalid for transparently transmitted packets.
  • The MAC address cannot be 0000-0000-0000.

  • Before configuring MAC encapsulation, delete the UDP encapsulation configuration if UDP encapsulation has been configured.

  • MAC encapsulation is required when the VLAN ID to be encapsulated to sent or received packets is configured.

Example

# Configure the unicast MAC encapsulation for the PTP packet.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/0
[HUAWEI-XGigabitEthernet1/0/0] ptp mac-egress destination-mac 001B-1911-1100

# Configure the multicast MAC encapsulation for the PTP packet.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/0
[HUAWEI-XGigabitEthernet1/0/0] ptp mac-egress vlan 2 priority 2
Related Topics

ptp min-delayreq-interval

Function

The ptp min-delayreq-interval command sets the minimum interval for sending Delay_Req messages on a 1588v2 interface.

The undo ptp min-delayreq-interval command restores the default minimum interval for sending Delay_Req messages on a 1588v2 interface.

By default, the minimum interval for sending Delay_Req messages on a 1588v2 interface is 128 ms.

Format

ptp min-delayreq-interval min-delayreq-interval

undo ptp min-delayreq-interval

Parameters

Parameter Description Value
min-delayreq-interval Specifies that the minimum interval for sending Delay_Req messages on a 1588v2 interface is set to the min-pdelayreq-intervalth power of 2, in milliseconds. The value is an integer that ranges from 0 to 20. The default value is 7, namely, 128 ms. Table 3-201 shows the mapping between the min-delayreq-interval value and the actual sending interval.
Table 3-201  Mapping between the min-delayreq-interval value and the actual sending interval
Value of min-delayreq-interval

Actual Interval

0 1 ms
1 2 ms
2 4 ms
3 8 ms
4 16 ms
5 32 ms
6 64 ms
7 128 ms
8 256 ms
9 512 ms
10 1s
11 2s
12 4s
13 8s
14 16s
15 32s
16 64s
17 128s
18 256s
19 512s
20 1024s

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

During 1588v2 clock synchronization, an Announce message is sent to determine the master-slave hierarchy, where the upstream node that advertises the synchronization time is the master device and the downstream node that receives the synchronization time is called the slave device. The master device sends Sync messages to the slave device to transmit performance parameters of time signals. In addition, the delay measurement mechanism can be implemented to ensure the accuracy of time signals.

Because the delay varies according to the network link, the 1588v2 time signals may be inaccurate. During 1588v2 clock synchronization, delay and Pdelay messages are transmitted to measure link delay, and time signals can be corrected based on the link delay. During the delay measurement request process, the local device sends a Delay_Req message and the peer device replies with a Delay_Resp message. There are two types of delay measurement mechanism.
  • delay: specifies a delay request-response mechanism, in which information about the clock and time is calculated according to the delay of the entire link between the PTP device and the clock source. In this mode, the slave device sends a Delay_Req message to the master device, and the slave device corrects time signals based on the Delay_Resp message replied by the master device.
  • pdelay: specifies a peer delay mechanism, in which information about the time and clock is calculated according to the delay of each segment of the link between the PTP device and the clock source. In this mode, the slave device and master device exchange Pdelay_Req messages and time signals are corrected based on the Pdelay_Resq messages replied.

If min-delayreq-interval is set to a small value, PTP devices frequently exchange Delay_Req messages, occupying many bandwidth resources. If min-delayreq-interval is set to a large value, high-precision clock synchronization cannot be guaranteed. If the required clock synchronization accuracy is guaranteed, set min-delayreq-interval to a large value.

Example

# Set the minimum interval for sending Delay_Req messages on the 1588v2 interface XGigabitEthernet 1/0/0 to 256 ms.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/0
[HUAWEI-XGigabitEthernet1/0/0] ptp min-delayreq-interval 8
Related Topics

ptp min-pdelayreq-interval

Function

The ptp min-pdelayreq-interval command configures the minimum interval for sending Pdelay_Req messages on a 1588v2 interface.

The undo ptp min-pdelayreq-interval command restores the default minimum interval for sending Pdelay_Req messages on a 1588v2 interface.

By default, the minimum interval for sending Pdelay_Req message is 128 ms.

Format

ptp min-pdelayreq-interval min-pdelayreq-interval

undo ptp min-pdelayreq-interval

Parameters

Parameter Description Value
min-pdelayreq-interval Specifies that the minimum interval for sending Pdelay_Req messages on a 1588v2 interface is set to the min-pdelayreq-interval power of 2, in milliseconds. The value is an integer that ranges from 0 to 20. The default value is 7, that is, 128 milliseconds. Table 3-202 lists the mapping between the min-pdelayreq-interval value and the actual sending interval.
Table 3-202  Mapping between the min-pdelayreq-interval value and the actual sending interval
Value of min-pdelayreq-interval

Actual Interval

0 1 ms
1 2 ms
2 4 ms
3 8 ms
4 16 ms
5 32 ms
6 64 ms
7 128 ms
8 256 ms
9 512 ms
10 1s
11 2s
12 4s
13 8s
14 16s
15 32s
16 64s
17 128s
18 256s
19 512s
20 1024s

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

During 1588v2 clock synchronization, an Announce message is sent to determine the master-slave hierarchy, where the upstream node that advertises the synchronization time is the master device and the downstream node that receives the synchronization time is called the slave device. The master device sends Sync messages to the slave device to transmit performance parameters of time signals. In addition, the delay measurement mechanism can be implemented to ensure the accuracy of time signals.

Because the delay varies according to the network link, the 1588v2 time signals may be inaccurate. During 1588v2 clock synchronization, delay and Pdelay messages are transmitted to measure link delay, and time signals can be corrected based on the link delay. During the delay measurement request process, the local device sends a Delay_Req message and the peer device replies with a Delay_Resp message. There are two types of delay measurement mechanism.
  • delay: specifies a delay request-response mechanism, in which information about the clock and time is calculated according to the delay of the entire link between the PTP device and the clock source. In this mode, the slave device sends a Delay_Req message to the master device, and the slave device corrects time signals based on the Delay_Resp message replied by the master device.
  • pdelay: specifies a peer delay mechanism, in which information about the time and clock is calculated according to the delay of each segment of the link between the PTP device and the clock source. In this mode, the slave device and master device exchange Pdelay_Req messages and time signals are corrected based on the Pdelay_Resq messages replied.

If min-pdelayreq-interval is set to a small value, PTP devices frequently exchange Pdelay_Req messages, occupying many bandwidth resources. If min-pdelayreq-interval is set to a large value, high-precision clock synchronization cannot be guaranteed. If the required clock synchronization accuracy is guaranteed, set min-pdelayreq-interval to a large value.

Example

# Set the minimum interval for sending Pdelay_Req messages on the 1588v2 interface XGigabitEthernet 1/0/0 to 128 ms.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/0
[HUAWEI-XGigabitEthernet1/0/0] ptp min-pdelayreq-interval 7
Related Topics

ptp port-type

Function

The ptp port-type command configures the clock mode of an interface on a TCandBC device.

The undo ptp port-type command deletes the clock mode configured on the interface on a TCandBC device.

By default, the PTP clock mode is not configured on the interface.

Format

ptp port-type { bc | tc }

undo ptp port-type

Parameters

Parameter

Description

Value

bc

Indicates that the clock mode configured on the interface of the TCandBC is BC.

-

tc

Indicates that the clock mode configured on the interface of the TCandBC is TC.

-

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

The device supports the TCandBC clock mode. In this case, you can configure the clock mode of the interface to TC or BC. If the original clock mode of the interface is BC or OC, and the interface is enabled with PTP, the clock mode of the interface changes to BC after the device clock mode is changed to TC and BC mode.

Precautions

  • If the interface is enabled with PTP, the ptp port-type command is invalid.

  • Before delete the clock mode of the interface of the TCandBC device, you must first clear the clock domain of the interface, if the clock mode is TC and the clock domain of the interface is configured.

Example

# Configure the clock mode of XGigabitEthernet1/0/1 interface on the TCandBC device to BC.

<HUAWEI> system-view
[HUAWEI] ptp device-type tcandbc
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp port-type bc

ptp slaveonly

Function

The ptp slaveonly command sets the attribute of the clock source interface of the OC to slave-only.

The undo ptp slaveonly command restores the default status of the PTP interface of the OC.

By default, the clock source interface can be a master interface or a slave interface.

Format

ptp slaveonly [ chassis chassis-id ]

undo ptp slaveonly [ chassis chassis-id ]

Parameters

Parameter

Description

Value

chassis chassis-id

Specifies a chassis ID. This parameter is available only when the CSS function is enabled.

The value is 1 or 2.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

When an OC functions as the last clock node, the OC receives clock signals from an upstream device and sends the clock signals to clients. To prevent clock signals of clients from affecting the PTP system, configure the interface status of the OC to slave-only. This configuration ensures that the OC does not synchronize the clock signals of clients.

The OC in a domain has only one PTP interface. If the interface status of the OC is set to slave-only, no interface can switch to the master.

Example

# Set the attribute of the clock source interface to slave-only on the OC.

<HUAWEI> system-view
[HUAWEI] ptp device-type oc 
[HUAWEI] ptp slaveonly 

ptp sync-interval

Function

The ptp sync-interval command sets the interval for sending Sync packets from an interface.

The undo ptp sync-interval command restores the default interval for sending Sync packets from an interface.

By default, the interval for sending Sync packets is 1 ms.

Format

ptp sync-interval sync-interval

undo ptp sync-interval

Parameters

Parameter

Description

Value

sync-interval

Indicates that the interval for sending Sync packets on an interface is set to the nth power of 2 in milliseconds, where n is specified by sync-interval.

The value is an integer that ranges from 0 to 20.

The default value is 0. That is, the interval is 1 ms.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

Sync packets are used to generate timestamps when the delay mechanism is used. Based on the generated timestamps, PTP calculates the link delay and implements clock synchronization. The interval for sending Sync packets affects the clock synchronization accuracy. A higher interval indicates a higher clock synchronization accuracy. However, a high packet sending interval will increase the network load. Therefore, configure the interval for sending Sync packets according to networking requirements.

Example

# Set the interval for sending Sync packets to 128 ms on XGigabitEthernet1/0/1.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp sync-interval 7
Related Topics

ptp tcoc-clock-id

Function

The ptp tcoc-clock-id command, you can specify a clock source for an OC interface on the TCOC device to synchronize.

The undo ptp tcoc-clock-id command cancels the previous setting.

By default, no clock source is specified for a TCOC device to synchronize.

Format

ptp tcoc-clock-id clock-source-id { port-num port-num | slot slot-id card card-id port port-id }

undo ptp tcoc-clock-id

Parameters

Parameter

Description

Value

clock-source-id

Specifies the ID of the peer clock source (ID of the static clock source).

The format is HHHHHHHH. H is a two-digit hexadecimal number, such as E0 and FC.

port-num port-num

Indicates the number of the interface where the peer master clock is located. The value is converted from the x/y/z format of the interface number. x stands for the slot number, y stands for the sub-card number, and z stands for the interface number.

To convert the port number from the x/y/z format into an integer, you need to first convert x into a 6-bit binary number; y into a 2-bit binary number; z into an 8-bit binary number. Then, rank these binary numbers in the format of x/y/z to obtain a 16-bit binary number. Convert the 16-bit binary number into a decimal number, which is the port-num value. For example, port number 2/0/1 on the master clock is converted into 2049.

The value is an integer that ranges from 0 to 65535.

slot slot-id

Specifies the slot ID of the interface where peer master clock is located.

The value is an integer that ranges from 0 to 32.

card card-id

Specifies the sub-card number of the interface where peer master clock is located.

The value is an integer that ranges from 0 to 3.

port port-id

Specifies the number of the interface where the peer master clock is located.

The value is an integer that ranges from 0 to 255.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

The ptp tcoc-clock-id command specifies the interface from which the local device synchronizes the clock frequency. The clock-source-id and port-num parameter of the command specify the port identify. The local device accepts only the PTP packets with specified clock ID and port number.

Precautions

  • A TCOC device cannot synchronize the time. It can synchronize only the frequency; therefore, it can be configured with only one interface. If an interface is configured with TCOC device.

  • If the peer device and the device use the same interface numbering rule, you can specify slot-id, card-id, and port-id in the command. Then the device calculates port-num automatically. This operation is easier and enables the device to find the specified interface more easily.

  • clock-source-id specifies the clock ID of the peer master clock source device and port-num specifies the number of the peer master clock interface. If the values of clock-source-id and port-num are incorrect or the specified master clock source is faulty, synchronization cannot be performed.

Example

# Set ID of the clock source for XGigabitEthernet1/0/1 on the TCOC device to 122323FFFE122110 and the number of the interface where the peer clock source locates to 1/0/1.

<HUAWEI> system-view
[HUAWEI] ptp device-type e2etcoc 
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp tcoc-clock-id 122323FFFE122110 slot 1 card 0 port 1

ptp udp-egress

Function

The ptp udp-egress command sets the UDP encapsulation mode for PTP packets.

The undo ptp udp-egress source-ip command restores the encapsulation mode for PTP packets to MAC encapsulation mode.

Using the undo ptp udp-egress { destination-ip | destination-mac | dscp | vlan | priority } command, you can restore the default configuration of the UDP encapsulation mode.

By default, PTP packets are encapsulated in MAC multicast mode. If UDP encapsulation is configured, multicast UDP encapsulation is used by default.

Format

ptp udp-egress source-ip source-ip [ destination-ip destination-ip ] [ dscp dscp ] [ vlan vlan-id [ priority priority ] ]

ptp udp-egress destination-mac destination-mac

undo ptp udp-egress { source-ip | destination-ip | destination-mac | dscp | vlan | priority }

Parameters

Parameter

Description

Value

source-ip source-ip

Indicates the source IP address of the UDP-encapsulated PTP packets.

The value is in dotted decimal notation.

destination-ip destination-ip

Indicates the destination IP address of the UDP-encapsulated PTP packets.

The value is in dotted decimal notation.

destination-mac destination-mac

Indicates the destination MAC address of the UDP-encapsulated PTP packets.

The value is in the format of H-H-H. An H contains one to four hexadecimal numbers.

dscp dscp

Indicates the Differentiated Service Code Point (DSCP) priority carried in the UDP-encapsulated PTP packets.

The value is an integer that ranges from 0 to 63. The default value is 7.

vlan vlan-id

Indicates the VLAN ID encapsulated in the PTP packets.

The value is an integer that ranges from 1 to 4094.

priority priority

Indicates the 802.1p priority carried in the VLAN-encapsulated packet.

The value is an integer that ranges from 0 to 7. The default value is 7, indicating the highest priority.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage scenario

By default, PTP packets are encapsulated in multicast MAC mode. You can use the ptp udp-egress command to change the encapsulation mode to UDP encapsulation to implement Layer 3 encapsulation.

UDP encapsulation is further classified into unicast UDP encapsulation and multicast UDP encapsulation.
  • Unicast encapsulation

    In this encapsulation mode, you need to set the unicast destination IP address of PTP packets.

  • Multicast encapsulation

    Table 3-203 shows destination IP addresses that can be used only in the multicast UDP encapsulation.
    Table 3-203  Default multicast IP address for delay and Pdelay measurement mechanisms
    Delay Mechanism IP Address

    All except peer delay

    224.0.1.129

    Peer delay

    224.0.0.107

    In multicast UDP encapsulation mode, you do not need to set the destination IP address.

Precautions

Before using the ptp udp-egress destination-mac destination-mac command to configure the destination MAC address for UDP encapsulation, configure the source IP address for UDP encapsulation. The destination MAC address cannot be all 0s or a multicast address.

Example

# Configure the PTP packet to be encapsulated in UDP unicast mode. Set the source IP address of the PTP packet to 192.168.2.2 and the destination IP address to 192.168.1.1.

<HUAWEI> system-view
[HUAWEI] interface xgigabitethernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] ptp udp-egress source-ip 192.168.2.2 destination-ip 192.168.1.1
Related Topics

ptp { utc-offset | leap59 | leap61 }

Function

The ptp utc-offset command corrects the UTC time.

The ptp leap59 date command corrects the UTC time at the last minute on a specified date, making the UTC 1 second shorter than the TAI time.

The ptp leap61 date command corrects the UTC time at the last minute on a specified date, making the UTC 1 second faster than the TAI time.

The undo ptp {utc-offset | leap59 | leap61 } command restores the default settings.

By default, the offset between the UTC and TAI is 0s.

Format

ptp { utc-offset utc-offset | leap59 date date | leap61 date date }

undo ptp { utc-offset | leap59 date date | leap61 date date }

Parameters

Parameter

Description

Value

utc-offset utc-offset

Indicates the accumulated offset between the UTC and TAI.

The value is an integer that ranges from 0 to 999, in seconds.

date date

Indicates the date on which the UTC time is corrected at 23:59.

The value is in the format of YYYY/MM/DD.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

UTC is also called the Greenwich Mean Time (GMT). The time displayed on the PTP device must be the UTC time. There is a fixed offset between the UTC and the International Atomic Time (TAI), and related international organization will periodically publish the offset value.

The utc-offset, leap59, leap61 parameters in the command are valid only when the BITS clock participates in the BMC calculation. Otherwise, the ptp utc-offset command does not take effect for Announce packets from the Master.

The ptp utc-offset command is used to correct the offset between the time displayed on the device and the TAI and needs to be used only on the grandmaster clock on the PTP network. The time on other clocks should synchronize with the time on the grandmaster clock.

  • When the device functions as the master clock:

    If the PTP time scale is used, you can set the utc-offset parameter to adjust the system time. The origin of the PTP time scale is 00:00:00 of January 1, 1970. The formula for converting the TAI time to the UTC time is: UTC = TAI - utc-offset.

    IEEE 1588v2 supports two types of time scales: ARB and PTP.
    • When the ARB time scale is used, the time can start from any time point and be reset by the management process. The slave clock obtains only the offset between the UTC time and TAI time in seconds.
    • When the PTP time scale is used, the system time is the UTC time adjusted according to utc-offset.

    You can also set the leap59 and leap61 parameters to fine tune utc-offset on a specified day. The leap59 parameter indicates that the last minute of the specified day contains 59 seconds. Similarly, the leap61 parameter indicates that the last minute of the specified day contains 61 seconds. Assume that utc-offset is A. If leap59 is specified, the UTC time is one second faster than the TAI time, that is, utc-offset = A - 1. If leap61 is specified, the UTC time is one second slower than the TAI time, that is, utc-offset = A + 1.

    The leap59 and leap61 cannot be specified at the same time.

  • When the device functions as the slave clock:
    • The device can obtain the UTC offset from the Announce packet received from the master clock.
    • When the device obtains the time through the BITS interface, you need to set the UTC offset manually because Announce packets cannot send the time information. The method of setting the UTC offset manually is the same as that used when the device functions as the master clock.

Example

# Set the offset between the UTC to TAI to 33s.

<HUAWEI> system-view
[HUAWEI] ptp utc-offset 33

# Set the UTC time to be 1 second faster than the TAI time on December 31, 2008.

<HUAWEI> system-view
[HUAWEI] ptp leap59 date 2008/12/31

# Set the UTC time to be 1 second slower than the TAI time on December 30, 2008.

<HUAWEI> system-view
[HUAWEI] ptp leap61 date 2008/12/30
Related Topics

ptp virtual-clock-id

Function

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

The undo ptp virtual-clock-id command restores the automatically generated clock ID on the PTP device.

By default, no virtual clock ID is configured on the PTP device. The clock ID is generated by padding fffe to the middle of the system bridge MAC address. For example, if the system bridge MAC address is 111122223333, the default clock ID is 111122fffe223333.

Format

ptp virtual-clock-id clock-id-value [ chassis chassis-id ]

undo ptp virtual-clock-id [ chassis chassis-id ]

Parameters

Parameter

Description

Value

clock-id-value

Specifies the lower four bytes of a virtual clock ID.

The lower four bytes of the virtual clock ID are configurable, whereas the higher four bytes are automatically allocated by the system.

The value of the higher four bytes automatically allocated by the system is 0x00259e32.

The value range is 00000001-ffffffff in the form of a hexadecimal number.

chassis chassis-id

Specifies a chassis ID. This parameter is available only when the CSS function is enabled.

The value is 1 or 2.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The 8-byte clock ID uniquely identifies a PTP device in the PTP domain. When a PTP device performs the master-slave switchover of the MPU, or has its master MPU replaced, the clock ID of the PTP device changes along with the system bridge MAC address. As a result, the clock ID may not uniquely identify the PTP device.

By using the ptp virtual-clock-id command, you can specify the clock ID of a PTP device. The specified clock ID does not change in the case of the master-slave switchover of the MPU or replacement of the MPU, and can therefore uniquely identify the PTP device. The lower four bytes of the virtual clock ID are configurable, whereas the higher four bytes are automatically allocated by the system.

Example

# Set the lower four bytes of the virtual clock ID on the PTP device to 00000123.

<HUAWEI> system-view
[HUAWEI] ptp virtual-clock-id 00000123 
Related Topics

reset ptp statistics

Function

The reset ptp statistics command clears statistics on PTP packets on the interface of a device.

Format

reset ptp statistics { all | interface interface-type interface-number }

Parameters

Parameter

Description

Value

all

Clears statistics on the received PTP packets of all interfaces.

-

interface interface-type interface-number

Clears statistics on the received PTP packets of a specified interface.
  • interface-type specifies the type of an interface.

  • interface-number specifies the number of an interface.

-

Views

User view

Default Level

2: Configuration level

Usage Guidelines

You can use the reset ptp statistics command to clear the statistics on the received PTP packets of a specified interface or all interfaces by restoring the counter.

Example

# Clear the statistics on PTP packets on XGigabitEthernet1/0/1.

<HUAWEI> reset ptp statistics interface xgigabitethernet 1/0/1
Translation
Download
Updated: 2019-04-09

Document ID: EDOC1100065659

Views: 124543

Downloads: 88

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next