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

Command Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

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).
1588v2 (PTP) Configuration Commands

1588v2 (PTP) Configuration Commands

NOTE:

1588v2 is supported only by the and CE6880-24S4Q2CQ-EI.

display ptp

Function

The display ptp command displays 1588v2 configuration.

Format

display ptp all [ config | state ]

display ptp interface interface-type interface-number

Parameters

Parameter Description Value
all Displays all 1588v2 statistics on the current device. -
config Displays the configurations of all 1588v2-related modules on the current device. -
state Displays the protocol status of all 1588v2-related modules on the current device. -
interface interface-type interface-number Displays statistics about the 1588v2 messages sent and received on a specified interface. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

You can run the display ptp command to check the operating status of the 1588v2 device.

Example

# Display 1588v2 module information.
<HUAWEI> display ptp all
  Device config info                                                            
  ------------------------------------------------------------------------------
  PTP state         :enabled              Domain  value      :2                 
  Slave only        :no                   Device type        :BC                
  Set port state    :no                   Local clock ID     :00259e1000000001  
  Acl               :no                   Virtual clock ID   :yes               
  Acr               :no                   Time lock success  :yes               
  Asymmetry measure :disable              Passive measure    :disable           
                                                                                
  BMC run info                                                                  
  ------------------------------------------------------------------------------
  Grand clock ID    :00259e1000000002                                           
  Receive number    :10GE1/0/1                                                  
  Parent clock ID   :00259e1000000002                                           
  Parent portnumber :4126                                                       
  Priority1         :190                 Priority2           :128               
  Step removed      :0                   Clock accuracy      :0x31              
  Clock class       :187                 Time Source         :0xa0              
  UTC Offset        :35                  UTC Offset Valid    :False             
  Timescale         :ARB                 Time traceable      :False             
  Leap              :None                Frequency traceable :False             
  Offset scaled     :0xffff                                                     
                                                                                
  Port info                                                                     
  Name                        State        Delay-mech Ann-timeout Type   Domain 
  ------------------------------------------------------------------------------
  10GE1/0/1                   slave        delay      4           BC     2      
  10GE1/0/2                   passive      delay      3           BC     2      
  10GE1/0/3                   passive      pdelay     3           BC     2      
                                                                                
  Time Performance Statistics(ns): Slot 1  Card 0  Port 1                       
  ------------------------------------------------------------------------------
  Realtime(T2-T1)   :200                     Pathdelay     :0                   
  Max(T2-T1)        :215                                                        
  Min(T2-T1)        :-2740362189                                                
                                                                                
  Clock source info                                                             
  Clock       Pri1 Pri2 Accuracy Class TimeSrc Signal Switch Direction In-Status
  ------------------------------------------------------------------------------
  local       210  128  0x31     187   0xa0    -      -      -         -        
<HUAWEI> display ptp interface 10ge 1/0/1
  Port State      :slave                                                        
  Port Clock ID   :00259e1000000001                                             
  Port Number     :2052                                                         
  Announce-interval :4                                                          
  Grand clock ID    :00259e1000000002                                           
  Receive number    :10GE1/0/1                                                  
  Parent clock ID   :00259e1000000002                                           
  Parent portnumber :4126                                                       
  Priority1         :190                 Priority2           :128               
  Step removed      :0                   Clock accuracy      :0x31              
  Clock class       :187                 Time Source         :0xa0              
  UTC Offset        :35                  UTC Offset Valid    :False             
  Timescale         :ARB                 Time traceable      :False             
  Leap              :None                Frequency traceable :False             
  Offset scaled     :0xffff                                                     
                                                                                
  Recv Packet Statistics                                                        
  -----------------------------------------------------------------------       
  Announce               :1338092    Sync                       :1338016        
  Req                    :0          Resp                       :1337958        
  Followup               :1338016    Pdelay_resp_followup       :0              
                                                                                
  Send Packet Statistics                                                        
  -----------------------------------------------------------------------       
  Announce               :75         Sync                       :72             
  Req                    :1337960    Resp                       :0              
  Followup               :72         Pdelay_resp_followup       :0              
                                                                                
  Discard Packet Statistics                                                     
  -----------------------------------------------------------------------       
  Announce               :7          Sync                       :80             
  Delayreq               :0          Pdelayreq                  :0              
  Resp                   :3          Pdelayresp                 :0              
  Followup               :80         Pdelay_resp_followup       :0              
Table 5-63  Description of the display ptp command output
Item

Description

Device config info Device configuration information.
PTP state Whether 1588v2 is enabled.
Domain value 1588v2 clock domain value.
Slave only Whether the slave-only mode is set.
Device type 1588v2 device type.
Set port state Whether static clock source selection is enabled.
Local clock ID ID of a local clock source.
Acl Whether the access control list (ACL) function is enabled for the clock source.
Virtual clock ID Whether the virtual clock ID is set.
Acr Whether statically 1588v2 adaptive clock recovery (ACR) is enabled.
Time lock success Time lock status.
Asymmetry measure Whether automatic asymmetry measurement for a ring network is enabled.
Passive measure Whether performance monitoring is enabled on the passive interface.
BMC run info Best master clock (BMC) running information.
Grand clock ID ID of the grandmaster clock (GMC).
Receive number Type and number of the interface that receives the ebest dataset that is calculated using the BMC dataset comparison algorithm.
Parent clock ID ID of the parent clock.
Parent portnumber Signal output interface of the parent clock.
Priority1 Priority 1 value of a clock source.
Priority2 Priority 2 value of a clock source.
Step removed Number of hops between a local device and a clock source.
Clock accuracy Clock source accuracy.
Clock class Class of a clock source.
Time Source Time source that the GMC uses.
UTC Offset UTC offset (in seconds) of the GMC.
UTC Offset Valid Whether the UTC offset value of the GMC is correct.
Timescale Time scale of the GMC.
Time Traceable Whether the GMC traces the primary reference clock source.
Leap Leap value of the GMC.
Frequency traceable Whether the time scale frequency of the GMC traced from the primary reference clock source.
Offset scaled Offset scaled log variance of the GMC.
Port info 1588v2 interface information.
Name Time source name.
State Time source status.
Delay-mech Port delay mode.
Ann-timeout Number of Announce message receiving timeouts.
Type Port type.
Domain Domain ID of a port.
Time Performance Statistics Time attribute value.
Realtime(T2-T1) Real-time value of T2-T1.
Pathdelay Path delay.
Max(T2-T1) Maximum value of T2-T1.
Min(T2-T1) Minimum value of T2-T1.
Clock source info Clock source configuration.
Clock Clock source name.
Pri1 Priority 1 value of a clock source.
Pri2 Priority 2 value of a clock source.
Accuracy Accuracy of a clock source.
Class Clock class of a clock source.
TimeSrc Clock source type.
Signal Time signal type.
Switch Time source switch control.
Direction Transmission direction of time signals.
In-Status Time source input status.
Port State 1588v2 port status.
Port Clock ID Clock ID of a port.
Port Number Port number.
Announce-interval Interval for transmitting Announce messages on the peer end.
Recv Packet Statistics Received packet statistics.
Send Packet Statistics Sent packet statistics.
Discard Packet Statistics Dropped packet statistics.
Announce Announce message statistics.
Sync Sync message statistics.
Req Req message statistics.
Resp Resp message statistics.
Followup Follow_Up message statistics.
Pdelay_resp_followup Pdelay_Resp_Follow_Up message statistics.
Delayreq Delay_Req message statistics.
Pdelayreq Pdelay_Req message statistics.
Pdelayresp Pdelay_Resp message statistics.

display ptp utc

Function

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

Format

display ptp utc

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

  • If the system time is not synchronized with the UTC time, information similar to the following is displayed:
    Non-UTC Time:2000-01-04 09:56:24
  • If the system time is synchronized with the UTC time, the UTC time of the grandmaster clock that the system traces is displayed. For example:
    UTC Time:2012-07-01 00:41:45

Example

# Display the current UTC time.

<HUAWEI> display ptp utc
UTC Time:2012-07-01 00:41:45

ptp acl enable

Function

The ptp acl enable command enables access control of clock sources.

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

By default, access control of clock sources is disabled.

Format

ptp acl enable

undo ptp acl enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To specify the ID of a clock that a local device uses to select the BMC, run the ptp acl-permit-clockid command. This command allows the device to select the BMC among clocks with the IDs in the configured clock ID list. This function prevents clock flapping over an entire network resulting from clock attacks or incorrect configurations.

Follow-up Procedure

Run the ptp acl-permit-clockid command.

Example

# Enable access control of clock sources.

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

ptp acl-permit-clockid

Function

The ptp acl-permit-clockid command enables a 1588v2 device to use a clock with the specified clock ID to calculate the local best master clock (BMC).

The undo ptp acl-permit-clockid command disables a 1588v2 device from using a clock with the specified clock ID to calculate the local BMC.

By default, after access control of clock sources is enabled, no clock source participates in clock source selection if the clock ID range allowed to participate in clock source selection is not configured.

Format

ptp acl-permit-clockid clockid-value

undo ptp acl-permit-clockid clockid-value

Parameters

Parameter Description Value
clockid-value Specifies a clock source ID. The value is an 8-byte hexadecimal integer ranging from 0 to FFFFFFFFFFFFFFFF.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To specify the ID of a clock that a local device uses to select the BMC, run the ptp acl-permit-clockid command. This command allows the device to select the BMC among clocks with the IDs in the configured clock ID list. This function prevents clock flapping over an entire network resulting from clock attacks or incorrect configurations.

Prerequisites

Access control of clock sources has been enabled using the ptp acl enable command.

Follow-up Procedure

Run the display ptp all command on the device to view clock IDs of clock sources.

Example

# Allow the local device to use the clock source with the clock ID 0000000000001234 to calculate the local BMC.

<HUAWEI> system
[~HUAWEI] ptp acl enable
[*HUAWEI] ptp acl-permit-clockid 0000000000001234

ptp announce receipt-timeout

Function

The ptp announce receipt-timeout command sets the maximum number of Announce message receiving timeouts on a 1588v2 interface.

The undo ptp announce receipt-timeout command restores the default maximum number of Announce message receiving timeouts on a 1588v2 interface.

By default, the maximum number of Announce message receiving timeouts on a 1588v2 interface is 3.

Format

ptp announce receipt-timeout receipt-timeout

undo ptp announce receipt-timeout

Parameters

Parameter Description Value
receipt-timeout Specifies the maximum number of Announce message receiving timeouts on a 1588v2 interface. In 1588v2 mode, the value is an integer ranging from 2 to 255, and the default value is 3.

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Two 1588v2 devices exchange Announce messages to determine the master-slave hierarchy. The master device sends Sync messages to notify the slave device of time signal parameters and uses a delay measurement mechanism to achieve time signal accuracy.

To set the maximum number of Announce message receiving timeouts on a 1588v2 interface, run the ptp announce receipt-timeout command. If the number of Announce message receiving timeouts on a 1588v2 interface exceeds the configured receipt-timeout value, the local device sets the 1588v2 interface status to Master, does not synchronize the time with other 1588v2 devices, and uses the BMC algorithm to select a clock source for time synchronization. To prevent frequent clock source switching resulting from Announce message receiving timeouts, set receipt-timeout to a larger value. To switch clock sources in time, set receipt-timeout to a smaller value. In most cases, the default value is recommended.

Precautions

The following formula applies:

Local timeout period of receiving Announce messages = Locally configured receipt-timeout x Remotely configured announce-interval

The ptp announce-interval announce-interval command sets the interval at which Announce messages are sent.

Example

# Set the maximum number of Announce message receiving timeouts on 10GE1/0/1 to 4.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp announce receipt-timeout 4
Related Topics

ptp announce-drop enable

Function

The ptp announce-drop enable command enables an interface of a 1588v2 device to ignore Announce messages.

The undo ptp announce-drop enable command disables an interface of a 1588v2 device from ignoring Announce messages.

By default, an interface does not ignore Announce messages.

Format

ptp announce-drop enable

undo ptp announce-drop enable

Parameters

None

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Two 1588v2 devices exchange Announce messages to determine the master-slave hierarchy. The master device sends Sync messages to notify the slave device of time signal parameters and uses a delay measurement mechanism to achieve time signal accuracy.

After 1588v2 is enabled globally on a device, all interfaces on the device send and receive Announce messages. Some interfaces do not participate in time synchronization because receiving a large number of Announce messages may affect other services. When a device does not need to receive clock synchronization information of other devices through a specific interface, you can enable this interface to ignore Announce messages.

Example

# Enable 10GE1/0/1 of a 1588v2 device to ignore Announce messages.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp announce-drop enable

ptp announce-interval

Function

The ptp announce-interval command sets the interval at which a 1588v2 interface sends Announce messages.

The undo ptp announce-interval command restores the default interval.

By default, the interval at which a 1588v2 interface sends Announce messages is 128/1024s.

Format

ptp announce-interval announce-interval

undo ptp announce-interval

Parameters

Parameter Description Value
announce-interval Specifies the interval at which a 1588v2 interface sends Announce messages. In 1588v2 mode, the value is an integer ranging from 0 to 20. The default value is 7, which is 128/1024s. Table 5-64 lists the mapping between announce-interval values and actual intervals.
Table 5-64  Mapping between announce-interval values and actual intervals
announce-interval

Actual Interval

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

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Two 1588v2 devices exchange Announce messages to determine the master-slave hierarchy. The master device sends Sync messages to notify the slave device of time signal parameters and uses a delay measurement mechanism to achieve time signal accuracy.

Precautions

If devices exchange 1588v2 messages frequently and consume a lot of bandwidth resources, increase the announce-interval value. If time synchronization accuracy is low, reduce the announce-interval value. If required time synchronization accuracy is guaranteed, set announce-interval to a larger value.

Remote timeout period of receiving Announce messages = Remotely configured receipt-timeout x Locally configured announce-interval

The ptp announce receipt-timeout receipt-timeout command sets the maximum number of Announce message receiving timeouts on a 1588v2 interface.

Example

# Set the interval at which 10GE1/0/1 sends Announce messages to 256/1024s.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp announce-interval 8

ptp asymmetry-correction

Function

The ptp asymmetry-correction command sets the asymmetrical delay correction value on a 1588v2 interface.

The undo ptp asymmetry-correction command cancels the configured asymmetrical delay correction value on a 1588v2 interface.

By default, the asymmetrical delay correction value is not configured on a 1588v2 interface.

Format

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

undo ptp asymmetry-correction

Parameters

Parameter

Description

Value

positive asymmetry-correction

Indicates the positive asymmetrical delay correction value.

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

negative asymmetry-correction

Indicates the negative asymmetrical delay correction value.

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

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

During path delay calculation, 1588v2 considers that the delays in the sending and receiving paths are the same by default and performs asymmetrical correction.

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

Example

# Set the asymmetrical delay correction value to 1 ns on 10GE1/0/1.

<HUAWEI> system-view
[~HUAWEI] interface 10GE 1/0/1
[~HUAWEI-10GE1/0/1] ptp asymmetry-correction positive 1
Related Topics

ptp clock-source

Function

The ptp clock-source command sets clock source parameters.

The undo ptp clock-source command restores default clock source parameters.

For default values of clock source parameters, see the "Parameters" part.

Format

ptp clock-source local { time-source time-source-value | clock-accuracy clock-accuracy-value | clock-class clock-class-value | priority1 priority1-value | priority2 priority2-value }

undo ptp clock-source local { time-source | clock-accuracy | clock-class | priority1 | priority2 }

Parameters

Parameter Description Value
local Indicates a local clock source. -
time-source time-source-value Specifies the value of a time source attribute. This parameter is configured only for the grandmaster clock. The value is an integer ranging from 1 to 8. The default value for local is 8. Table 5-65 lists the mapping between time source attributes and their values.
clock-accuracy clock-accuracy-value Specifies the accuracy value of a clock source. The value is a 2-digit hexadecimal number. The default value for local is 0x31. In 1588v2 mode, Table 5-66 lists the mapping between clock accuracy attributes and their values.
clock-class clock-class-value Specifies the class of a clock source. The value is an integer ranging from 0 to 255. The default value for local is 187. Table 5-67 lists the mapping between clock class attributes and their values.
NOTE:

When clock-class-value is less than 128, a device cannot function as a slave clock.

priority1 priority1-value Specifies the priority 1 value of clock signals. The value is an integer that ranges from 0 to 255. The default value is 128. A smaller value indicates a higher priority.
priority2 priority2-value Specifies the priority 2 value of clock signals. The value is an integer that ranges from 0 to 255. The default value is 128. A smaller value indicates a higher priority.
Table 5-65  Mapping between time source attributes and their values
Value Specification
1 ATOMIC_CLOCK
2 GPS
3 TERRESTRIAL_RADIO
4 PTP
5 NTP
6 HAND_SET
7 OTHER
8 INTERNAL_OSCILLATOR
Table 5-66  Mapping between clock accuracy attributes and their values
Value (Hex) Specification
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 μs.
24 The time is accurate to within 2.5 μs.
25 The time is accurate to within 10 μs.
26 The time is accurate to within 25 μs.
27 The time is accurate to within 100 μs.
28 The time is accurate to within 250 μs.
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 larger than 10s.
80-FD Reserved for a PTP template.
Table 5-67  Mapping between clock class attributes and their values
Value (Decimal) Specification
6 A clock of class 6 traces clock signals of the primary reference time source. The timescale distributed is the Precise Time Protocol (PTP). A clock of class 6 cannot function as a slave clock for other clocks in the same domain.
7 If a clock of class 6 becomes incapable of tracing clock signals of the primary reference time source, the clock obtains class 7 and works in hold mode. The timescale distributed is PTP. A clock of class 7 cannot function as a slave clock for other clocks in the same domain.
13 A clock of class 13 synchronizes clock signals with a specific clock source. The timescale distributed is arbitrary waveform (ARB). A clock of class 13 cannot function as a slave clock for other clocks in the same domain.
14 If a clock of class 13 becomes incapable of tracing clock signals of a specific clock source, the clock obtains class 14 and works in hold mode. The timescale distributed is ARB. A clock of class 14 cannot function as a slave clock for other clocks in the same domain.
52 A clock of class 7 becomes an alternative A clock because this clock of class 7 cannot meet hold requirements. A clock of class 52 cannot function as a slave clock for other clocks in the same domain.
58 A clock of class 14 becomes an alternative A clock because this clock of class 14 cannot meet hold requirements. A clock of class 58 cannot function as a slave clock for other clocks in the same domain.
187 A clock of class 7 becomes an alternative B clock because this clock of class 7 cannot meet hold requirements. A clock of class 187 can function as a slave clock for other clocks in the same domain.
193 A clock of class 14 becomes an alternative B clock because this clock of class 14 cannot meet hold requirements. A clock of class 193 can function as a slave clock for other clocks in the same domain.
248 Default clock class. A clock obtains class 248 if no class is defined for it.
255 A clock of class 255 works in slave-only mode.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The best master clock (BMC) algorithm enables dynamic 1588v2-enabled devices to automatically select the grandmaster clock and master clock. To set parameters used in the BMC algorithm, run the ptp clock-source command.

Precautions

A 1588v2-enabled switch uses the BMC algorithm and compares the following parameters in sequence to select a master clock:
  • priority1
  • clock-class
  • clock-accuracy
  • priority2
For example, the switch compares priority 1 values of two candidates. If the two candidates have the same priority 1 value, the switch compares clock class values of the two candidates. The process continues until the switch selects the master clock.

Example

# Select an atomic clock as a local clock source.
<HUAWEI> system-view
[~HUAWEI] ptp enable
[*HUAWEI] ptp clock-source local time-source 1
# Set the priority 1 value of the local clock source to 1.
<HUAWEI> system-view
[~HUAWEI] ptp enable
[*HUAWEI] ptp clock-source local priority1 1
# Set the priority 2 value of the local clock source to 1.
<HUAWEI> system-view
[~HUAWEI] ptp enable
[*HUAWEI] ptp clock-source local priority2 1
# Configure the local clock source to be accurate to larger than 10s.
<HUAWEI> system-view
[~HUAWEI] ptp enable
[*HUAWEI] ptp clock-source local clock-accuracy 31
# Set the class of the local clock source to 10.
<HUAWEI> system-view
[~HUAWEI] ptp enable
[*HUAWEI] ptp clock-source local clock-class 10

ptp clock-step

Function

The ptp clock-step command configures a timestamping mode on a 1588v2 device.

The undo ptp clock-step command restores the default timestamping mode.

By default, the one-step timestamping mode is used.

Format

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

undo ptp clock-step

Parameters

Parameter Description Value
one-step Indicates the one-step timestamping mode. A Sync message in Delay mode and a Pdelay_Resp message in Pdelay mode are timestamped with the time when these messages are sent. -
two-step Indicates the two-step timestamping mode. A Sync message in Delay mode and a Pdelay_Resp message in Pdelay mode record only the time when they are generated but are not timestamped with the time when they are sent. Instead, a Follow_Up message is timestamped with the time when the Sync message is sent, and a Pdelay_Resp_Follow_Up message is timestamped with the time when the Pdelay_Resp message is sent. -

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Two 1588v2 devices exchange Announce messages to determine the master-slave hierarchy. The master device sends Sync messages to notify the slave device of time signal parameters and uses a delay measurement mechanism to achieve time signal accuracy.

1588v2 adds timestamps into messages to record the time when these messages are sent. 1588v2 uses timestamps to adjust clock signals and implement accurate clock synchronization. Either of the following parameters can be specified in the ptp clock-step command:
  • one-step: A Sync message in Delay mode and a Pdelay_Resp message in Pdelay mode are timestamped with the time when these messages are sent.
  • two-step: A Sync message in Delay mode and a Pdelay_Resp message in Pdelay mode are not timestamped with the time when they are sent. Instead, a Follow_Up message is timestamped with the time when the Sync message is sent, and a Pdelay_Resp_Follow_Up message is timestamped with the time when the Pdelay_Resp message is sent.

Precautions

The switch uses the one-step timestamping mode by default. To communicate with other devices, the switch can also identify received Follow_Up messages timestamped in two-step mode.

1588v2 interfaces that support different timestamping modes can communicate with each other.

Example

# Configure the two-step timestamping mode.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp clock-step two-step
Related Topics

ptp delay-mechanism

Function

The ptp delay-mechanism command configures the delay measurement mechanism used on an interface of a 1588v2 device.

The undo ptp delay-mechanism command restores the default delay measurement mechanism used on an interface of a 1588v2 device.

By default, a 1588v2 device uses the Delay mechanism.

Format

ptp delay-mechanism { delay | pdelay }

undo ptp delay-mechanism

Parameters

Parameter Description Value
delay Configures the delay request-response mechanism, in which information about the clock and time is calculated based on the delay time of an entire link between the master and slave clocks. -
pdelay Configures the peer delay mechanism, in which information about the clock and time is calculated based on the delay time of each link along the path between the master and slave clocks. -

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Two 1588v2 devices exchange Announce messages to determine the master-slave hierarchy. The master device sends Sync messages to notify the slave device of time signal parameters and uses a delay measurement mechanism to achieve time signal accuracy.

Different delays on links may affect 1588v2 time synchronization accuracy. 1588v2 uses the delay measurement mechanism to correct time signals. A delay measurement process is implemented by sending delay measurement request messages and delay response messages. Either of the following parameters can be configured in the ptp delay-mechanism command to specify a delay measurement mechanism:
  • delay: configures the delay request-response mechanism, in which information about the clock and time is calculated based on the delay time of an entire link between the master and slave clocks. Only the slave clock can send Delay_Req messages to the master clock, and the master clock replies with Delay_Resp messages. Upon receipt of the responses, the slave clock uses information carried in Delay_Resp messages to correct time signals.
  • pdelay: configures the peer delay mechanism, in which information about the clock and time is calculated based on the delay time of each link along the path between the master and slave clocks. In this mode, the master and slave clocks can send Pdelay_Rep messages to each other and then correct time signals based on the Pdelay_Resp messages. Upon receipt of the responses, the slave or master clock uses information carried in Pdelay_Resp messages to correct time signals.

When both ends of a link know the link delay, the Pdelay mechanism helps rapidly correct the path length if the network is reconfigured.

Precautions

Both ends of a link must use the same delay measurement mechanism.

Example

# Configure the Delay mechanism on 10GE1/0/1 of a 1588v2 device.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp delay-mechanism delay

ptp device-type

Function

The ptp device-type command sets a clock mode for a 1588v2 device.

The undo ptp device-type command deletes the configured 1588v2 clock mode for a 1588v2 device.

By default, no 1588v2 clock mode is configured.

Format

ptp device-type { oc | bc }

undo ptp device-type

Parameters

Parameter Description Value
bc Configures a 1588v2 device as a boundary clock (BC). A BC has multiple 1588v2 clock interfaces. One interface of a BC synchronizes time signals with its upstream clock, and other interfaces advertise the time to downstream clocks. -
oc Configures a 1588v2 device as an ordinary clock (OC). Only a single interface on an OC belongs to a 1588v2 domain. This interface synchronizes time signals with its upstream clock and advertises the time to downstream clocks. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Switches must be configured with a clock mode before they run 1588v2 to synchronize clock signals. To set a 1588v2 clock mode, run the ptp device-type command.

Precautions

Each 1588v2 device can be configured with only a single clock mode. After enabling 1588v2 on a device, perform the following operations if the clock mode needs to be changed:
  • Disable the following configurations:
    • Run the undo ptp enable command in the interface view to disable 1588v2.
    • Run the undo ptp device-type command to delete the existing clock mode configuration.
    • Run the undo ptp delay-mechanism command to disable the configured delay measurement mechanism.
    • Run the undo ptp slaveonly command on an OC to disable the slave-only mode.
  • Run the ptp device-type command to change the clock mode. This command does not affect 1588v2 functions or parameters configured on interfaces. Before changing the clock mode, ensure that the configurations that the new clock mode does not support have been disabled on the device.

Example

# Configure a 1588v2 device as an OC.
<HUAWEI> system-view
[~HUAWEI] ptp device-type oc

ptp domain

Function

The ptp domain command specifies the clock domain in which a 1588v2 device resides.

The undo ptp domain command restores the default clock domain.

By default, a 1588v2 device resides in clock domain 0.

Format

ptp domain domain-value

undo ptp domain

Parameters

Parameter Description Value
domain-value Specifies a clock domain. In 1588v2 mode, the value is an integer ranging from 0 to 255. The default value is 0.

Views

System view, 10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A 1588v2 network can be logically divided into multiple clock domains. Each clock domain has a single clock source, all 1588v2 devices in the clock domain synchronize clock signals with this clock source, and each 1588v2 device in the clock domain focuses only on the 1588v2 messages exchanged within this clock domain.

Example

# Specify clock domain 4.
<HUAWEI> system-view
[~HUAWEI] ptp domain 4

ptp enable (interface view)

Function

The ptp enable command enables 1588v2 on an interface.

The undo ptp enable command disables 1588v2 on an interface.

By default, 1588v2 is disabled on an interface.

Format

ptp enable

undo ptp enable

Parameters

None.

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

1588v2 can be enabled in the system and interface views:
  • Run the ptp enable (system view) command in the system view to enable 1588v2 on a device. 1588v2 functions then can be configured in the system view.
  • Run the ptp enable (interface view) command in the interface view of the device. 1588v2 functions then can be configured in the interface view.

Example

# Enable 1588v2 on 10GE1/0/1.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp enable

ptp enable (system view)

Function

The ptp enable command enables 1588v2 on a device.

The undo ptp enable command disables 1588v2 on a device.

By default, 1588v2 is disabled on a device.

Format

ptp enable

undo ptp enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

1588v2 can be enabled in the system and interface views:
  • Run the ptp enable command in the system view to enable 1588v2 on a device. 1588v2 functions then can be configured in the system view.
  • Run the ptp enable command in the interface view of the device. 1588v2 functions then can be configured in the interface view.

Example

# Enable 1588v2 on a device.
<HUAWEI> system-view
[~HUAWEI] ptp enable

ptp mac-egress

Function

The ptp mac-egress command configures MAC encapsulation for 1588v2 messages sent on an interface and configures the VLAN ID and priority for these 1588v2 messages.

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

The undo ptp mac-egress vlan [ priority ] command restores the default VLAN ID and priority for 1588v2 messages.

By default, 1588v2 messages are encapsulated in multicast MAC encapsulation mode, do not carry the VLAN ID, and use the priority 7.

Format

ptp mac-egress destination-mac destination-mac

ptp mac-egress vlan vlan-id [ priority priority-value ]

undo ptp mac-egress destination-mac

undo ptp mac-egress vlan [ priority ]

Parameters

Parameter Description Value
destination-mac destination-mac Specifies a destination MAC address for 1588v2 messages. The value is in H-H-H format, where H is a 4-digit hexadecimal number.
vlan vlan-id Specifies a VLAN ID for 1588v2 messages. The value is an integer ranging from 1 to 4094.
priority priority-value Specifies the priority value for 1588v2 messages. The value is an integer ranging from 0 to 7. The default value is 7. A larger value indicates a higher priority.

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

1588v2 messages can be encapsulated into Layer 2 and Layer 3 packets. You can set the encapsulation mode, destination address, and transmission priority for 1588v2 messages based on networking.

Before setting the encapsulation mode for 1588v2 messages, determine the link type used to transmit 1588v2 messages:
  • If 1588v2 messages are transmitted over a Layer 2 link, run the ptp mac-egress command to configure MAC encapsulation.
  • If 1588v2 messages are transmitted over a Layer 3 link, run the ptp udp-egress command to configure UDP encapsulation.
Specify a destination MAC address as needed:
  • Specify a destination MAC address if unicast MAC encapsulation is used.

  • Use a default destination MAC address if multicast MAC encapsulation is used. Table 5-68 lists default multicast MAC addresses when different delay measurement mechanisms are used.
    Table 5-68  Default multicast MAC address
    Delay Measurement Mechanism Destination MAC Address

    Pdelay

    01-1B-19-00-00-00

    Delay

    01-80-C2-00-00-0E

Prerequisites

A delay measurement mechanism has been specified using the ptp delay-mechanism { delay | pdelay } command.

1588v2 has been enabled on an interface using the ptp enable (interface view) command.

Precautions

1588v2 services require a higher priority than other services. A high transmission priority minimizes the delay or congestion impact on clock signal recovery. The default highest priority is recommended.

Example

# Configure unicast MAC encapsulation.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp mac-egress destination-mac 001B-1911-1100 
# Configure multicast MAC encapsulation.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp mac-egress vlan 1 priority 2

ptp max-steps-removed

Function

The ptp max-steps-removed command configures the maximum number of hops for a time synchronization device.

The undo ptp max-steps-removed command restores the default maximum number of hops for a time synchronization device.

By default, the maximum number of hops for a time synchronization device is 255.

Format

ptp max-steps-removed max-steps-removed-value

undo ptp max-steps-removed [ max-steps-removed-value ]

Parameters

Parameter Description Value
max-steps-removed max-steps-removed-value

Specifies the maximum number of hops.

The value is an integer ranging from 1 to 255.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

In 1588v2, the maximum stepsRemoved value is defined as 255 to prevent network loops. That is, when the stepsRemoved value in a received 1588v2 message is larger than or equal to 255, this message is considered invalid and should be discarded or ignored. To reduce the impact of network loops on time synchronization performance and shorten the loop duration, run the ptp max-steps-removed command to configure the maximum number of hops for a time synchronization device based on the network scale.

Precautions

When the stepsRemoved value in an Announce message received by a clock source is larger than or equal to the configured maximum value, this clock source is considered unavailable. The maximum value needs to be specified based on the time synchronization network scale.

Example

# Set the maximum number of hops for a time synchronization device to 35.
<HUAWEI> system-view
[~HUAWEI] ptp max-steps-removed 35

ptp min-delayreq-interval

Function

The ptp min-delayreq-interval command sets the minimum interval at which a 1588v2 interface sends Delay_Req messages.

The undo ptp min-delayreq-interval command restores the default minimum interval at which a 1588v2 interface sends Delay_Req messages.

By default, the minimum interval at which a 1588v2 interface sends Delay_Req messages is 128/1024s.

Format

ptp min-delayreq-interval min-delayreq-interval

undo ptp min-delayreq-interval

Parameters

Parameter Description Value
min-delayreq-interval Specifies the minimum interval at which a 1588v2 interface sends Delay_Req messages. The value is an integer ranging from 0 to 20. In 1588v2 mode, the default value is 7. Table 5-69 lists the mapping between min-delayreq-interval values and actual intervals.
Table 5-69  Mapping between min-delayreq-interval values and actual intervals
min-delayreq-interval Value

Actual Interval

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

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Two 1588v2 devices exchange Announce messages to determine the master-slave hierarchy. The master device sends Sync messages to notify the slave device of time signal parameters and uses a delay measurement mechanism to achieve time signal accuracy.

Different delays on links may affect 1588v2 time synchronization accuracy. 1588v2 uses the delay measurement mechanism to correct time signals. A delay measurement process is implemented by sending delay measurement request messages and delay response messages. Either of the following parameters can be configured in the ptp delay-mechanism command to specify a delay measurement mechanism:
  • delay: configures the delay request-response mechanism, in which information about the clock and time is calculated based on the delay time of an entire link between the master and slave clocks. Only the slave clock can send Delay_Req messages to the master clock, and the master clock replies with Delay_Resp messages. Upon receipt of the responses, the slave clock uses information carried in Delay_Resp messages to correct time signals.
  • pdelay: configures the peer delay mechanism, in which information about the clock and time is calculated based on the delay time of each link along the path between the master and slave clocks. In this mode, the master and slave clocks can send Pdelay_Rep messages to each other and then correct time signals based on the Pdelay_Resp messages. Upon receipt of the responses, the slave or master clock uses information carried in Pdelay_Resp messages to correct time signals.

If min-delayreq-interval is set to a small value, 1588v2 devices frequently exchange 1588v2 messages, occupying many bandwidth resources. If min-delayreq-interval is set to a large value, required time synchronization accuracy cannot be guaranteed. Therefore, if required time synchronization accuracy is guaranteed, set min-delayreq-interval to a larger value.

Prerequisites

The delay request-response mechanism (Delay mechanism) has been configured on the interface using the ptp delay-mechanism delay command.

Example

# Set the minimum interval at which 10GE1/0/1 sends Delay_Req messages to 256/1024s.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp min-delayreq-interval 8
Related Topics

ptp min-pdelayreq-interval

Function

The ptp min-pdelayreq-interval command sets the minimum interval at which a 1588v2 interface sends Pdelay_Req messages.

The undo ptp min-pdelayreq-interval command restores the default minimum interval at which a 1588v2 interface sends Pdelay_Req messages.

By default, the minimum interval at which a 1588v2 interface sends Pdelay_Req messages is 128/1024s.

Format

ptp min-pdelayreq-interval min-pdelayreq-interval

undo ptp min-pdelayreq-interval

Parameters

Parameter Description Value
min-pdelayreq-interval Specifies the minimum interval at which a 1588v2 interface sends Pdelay_Req messages. The value is an integer ranging from 0 to 20. The default value is 7, namely, 128/1024s. Table 5-70 lists the mapping between min-pdelayreq-interval values and actual intervals.
Table 5-70  Mapping between min-pdelayreq-interval values and actual intervals
min-pdelayreq-interval Value

Actual Interval

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

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Two 1588v2 devices exchange Announce messages to determine the master-slave hierarchy. The master device sends Sync messages to notify the slave device of time signal parameters and uses a delay measurement mechanism to achieve time signal accuracy.

Different delays on links may affect 1588v2 time synchronization accuracy. 1588v2 uses the delay measurement mechanism to correct time signals. A delay measurement process is implemented by sending delay measurement request messages and delay response messages. Either of the following parameters can be configured in the ptp delay-mechanism command to specify a delay measurement mechanism:
  • delay: configures the delay request-response mechanism, in which information about the clock and time is calculated based on the delay time of an entire link between the master and slave clocks. Only the slave clock can send Delay_Req messages to the master clock, and the master clock replies with Delay_Resp messages. Upon receipt of the responses, the slave clock uses information carried in Delay_Resp messages to correct time signals.
  • pdelay: configures the peer delay mechanism, in which information about the clock and time is calculated based on the delay time of each link along the path between the master and slave clocks. In this mode, the master and slave clocks can send Pdelay_Rep messages to each other and then correct time signals based on the Pdelay_Resp messages. Upon receipt of the responses, the slave or master clock uses information carried in Pdelay_Resp messages to correct time signals.

If min-pdelayreq-interval is set to a small value, 1588v2 devices frequently exchange 1588v2 messages, occupying many bandwidth resources. If min-pdelayreq-interval is set to a large value, required time synchronization accuracy cannot be guaranteed. Therefore, if required time synchronization accuracy is guaranteed, set min-pdelayreq-interval to a larger value.

Prerequisites

The peer delay (Pdelay) mechanism has been configured for the interface using the ptp delay-mechanism pdelay command.

Example

# Set the minimum interval at which 10GE1/0/1 sends Pdelay_Req messages to 64/1024s.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[*HUAWEI-10GE1/0/1] ptp min-pdelayreq-interval 6
Related Topics

ptp port-state

Function

The ptp port-state command specifies the 1588v2 interface status.

The undo ptp port-state command restores the default 1588v2 interface status.

By default, a 1588v2 interface works in initializing state after statically specifying the 1588v2 interface status is enabled.

Format

ptp port-state { disabled | faulty | initializing | listening | master | passive | premaster | slave | uncalibrated }

undo ptp port-state

Parameters

Parameter Description Value
disabled Configures a 1588v2 interface to work in disabled state. A disabled interface is prohibited from sending 1588v2 messages and discards all received 1588v2 messages except Management messages. Setting a 1588v2 interface to the disabled state is equivalent to running the undo ptp enable command in the interface view to disable 1588v2 on the interface. -
faulty Configures a 1588v2 interface to work in faulty state. A faulty interface is prohibited from sending 1588v2 messages except responses to some Management messages. -
initializing Configures a 1588v2 interface to work in initializing state. An initializing interface cannot send or receive 1588v2 messages. -
listening Configures a 1588v2 interface to work in listening state. A listening interface does not trace external time information or advertise time information. When the master clock functions as an OC and is configured to work in slave-only mode or when it becomes faulty, its 1588v2 interface changes from the master state to the listening state. -
master Configures a 1588v2 interface to work in master state. A master interface advertises time information to other devices. -
passive Configures a 1588v2 interface to work in passive state. A passive interface does not trace external time information or advertise time information. Passive interfaces can send Pdelay_Req, Pdelay_Resp, Delay_Resp_Follow_Up, Signaling, and Management response messages. If multiple 1588v2 interfaces on a device detect that their peer interfaces are master interfaces in the same clock domain, this device sets the peer interface on the device with the highest priority to the master state, sets the local interface connected to this peer interface to the slave state, and sets other local interfaces to the passive state as backups of the slave interface. -
premaster Configures a 1588v2 interface to work in premaster state. A premaster interface does not trace external time information or advertise time information. Premaster interfaces can send Pdelay_Req, Pdelay_Resp, Delay_Resp_Follow_Up, Signaling, and Management response messages. -
slave Configures a 1588v2 interface to work in slave state. A slave interface traces external time information. Each 1588v2 device has a maximum of one slave interface. -
uncalibrated Configures a 1588v2 interface to work in uncalibrated state. This state is seldom used. An uncalibrated interface has detected one or more master interfaces in the same clock domain. The local device selects a master interface among the detected ones and local interfaces prepare to synchronize the time with this master interface. The uncalibrated state is a temporary state. -

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Static clock source selection and dynamic BMC selection are two independent mechanisms. Static clock source selection has a higher configuration priority than dynamic BMC selection. To manually determine the master-slave hierarchy between clock nodes within a network, run the ptp port-state command to set the status of 1588v2 interfaces on these nodes.

Limitations on static 1588v2 interface status configurations are as follows:

Prerequisites

The ptp set-port-state enable command has been executed in the system view to enable you to set the 1588v2 interface status.

Example

# Configure a 1588v2 interface to work in slave state.

<HUAWEI> system-view
[~HUAWEI] ptp set-port-state enable
[*HUAWEI] interface 10ge 1/0/1 
[*HUAWEI-10GE1/0/1] ptp port-state slave

ptp set-port-state enable

Function

The ptp set-port-state enable command enables the function of statically specifying the 1588v2 interface status.

The undo ptp set-port-state enable command disables the function of statically specifying the 1588v2 interface status.

By default, statically specifying the 1588v2 interface status is disabled.

Format

ptp set-port-state enable

undo ptp set-port-state enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

All nodes on a 1588v2 clock synchronization network establish the master-slave hierarchy with one another. The master node sends time information, and the slave node receives the time information to synchronize the time with the master node. In dynamic 1588v2 scenarios, the best master clock (BMC) algorithm automatically calculates the master-slave hierarchy. Before planning the master-slave hierarchy, configure the 1588v2 network to work in static mode and run the ptp set-port-state enable command to statically specify the status of each 1588v2 interface.

Prerequisites

In static 1588v2 scenarios, you need to enable 1588v2 in both the system view and interface view and then run the ptp set-port-state enable command to enable the function of statically specifying the 1588v2 interface status.

Follow-up Procedure

Run the ptp port-state command to specify the status of each 1588v2 interface except TC interfaces.

Configuration Impact

After the ptp set-port-state enable command is executed in the system view on a device, all 1588v2 interfaces on the device work in initializing state by default.

Precautions

The ptp set-port-state enable command applies only to static 1588v2 scenarios. In dynamic 1588v2 scenarios, the ptp slaveonly command can be executed on an OC to configure the OC to work in slave-only mode. The ptp slaveonly command is mutually exclusive with the ptp set-port-state enable command.

Example

# Enable the function of statically specifying the 1588v2 interface status in the system view.

<HUAWEI> system-view
[~HUAWEI] ptp set-port-state enable

ptp slaveonly

Function

The ptp slaveonly command configures an ordinary clock (OC) to work in slave-only mode.

The undo ptp slaveonly command cancels the slave-only mode for an OC.

By default, an OC can work as the master clock or a slave clock and does not work in slave-only mode.

Format

ptp slaveonly

undo ptp slaveonly

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An OC has only a single 1588v2 interface. Therefore, the OC can only function as the master clock to advertise clock signals to downstream devices or as a slave clock to receive clock signals from upstream devices. To enable an OC to work only as a slave clock, run the ptp slaveonly command on the OC.

Prerequisites

The device has been configured as an OC using the ptp device-type oc command.

Example

# Configure an OC to work in slave-only mode.

<HUAWEI> system-view
[~HUAWEI] ptp slaveonly

ptp sync-interval

Function

The ptp sync-interval command sets the interval at which a 1588v2 interface sends Sync messages.

The undo ptp sync-interval command restores the default interval at which a 1588v2 interface sends Sync messages.

By default, the interval at which a 1588v2 interface sends Sync messages is 8/1024s.

Format

ptp sync-interval sync-interval

undo ptp sync-interval

Parameters

Parameter Description Value
sync-interval Sets the interval at which a 1588v2 interface sends Sync messages. The value is an integer ranging from 0 to 20. In 1588v2 mode, the default value is 3, namely, 8/1024s. Table 5-71 lists the mapping between sync-interval values and actual intervals.
Table 5-71  Mapping between sync-interval values and actual intervals
sync-interval Value

Actual Interval

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

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Two 1588v2 devices exchange Announce messages to determine the master-slave hierarchy. The master device sends Sync messages to notify the slave device of time signal parameters and uses a delay measurement mechanism to achieve time signal accuracy.

The master interface periodically sends multicast Sync messages. If sync-interval is set to a small value, 1588v2 devices frequently exchange Sync messages, occupying many bandwidth resources. If sync-interval is set to a large value, required time synchronization accuracy cannot be guaranteed. Therefore, if required time synchronization accuracy is guaranteed, set sync-interval to a larger value.

Prerequisites

1588v2 has been enabled on an interface using the ptp enable (interface view) command.

Precautions

The sync-interval value is not the actual interval. For the mapping between the sync-interval values and actual intervals, see Table 5-71.

The time when Sync messages are sent can be carried by the Sync messages if the one-step timestamping mode is used or carried by Follow_Up messages if the two-step timestamping mode is used. To set a timestamping mode, run the ptp clock-step { one-step | two-step } command.

Example

# Set the interval at which 10GE1/0/1 sends Sync messages to 128/1024s.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp sync-interval 7

ptp udp-egress

Function

The ptp udp-egress command configures UDP encapsulation for 1588v2 messages sent by an interface and configures the destination MAC address, source IP address, destination IP address, VLAN ID, and priority for UDP-encapsulated 1588v2 messages.

The undo ptp udp-egress destination-mac command restores the default multicast MAC encapsulation mode for 1588v2 messages sent by an interface.

The undo ptp udp-egress { destination-ip | dscp | priority | source-ip | vlan } command restores the default UDP encapsulation settings.

By default, 1588v2 messages are encapsulated in multicast UDP mode.

Format

ptp udp-egress destination-mac destination-mac

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

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

Parameters

Parameter Description Value
destination-mac destination-mac Specifies a destination MAC address for UDP-encapsulated 1588v2 messages. The value is in H-H-H format, where H is a 4-digit hexadecimal number.
source-ip source-ip Specifies a source IP address for UDP-encapsulated 1588v2 messages. -
destination-ip destination-ip Specifies a destination IP address for UDP-encapsulated 1588v2 messages. -
dscp dscp Specifies a DiffServ Code Point (DSCP) value for UDP-encapsulated 1588v2 messages. The value is an integer ranging from 0 to 63. The default value is 56.
vlan vlan-id Specifies a VLAN ID for UDP-encapsulated 1588v2 messages. The value is an integer ranging from 1 to 4094.
priority priority Specifies the priority value for UDP-encapsulated 1588v2 messages. The value is an integer ranging from 0 to 7. The default value is 7. A larger value indicates a higher priority.

Views

10GE interface view, 40GE interface view, 100GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

1588v2 messages can be encapsulated into Layer 2 and Layer 3 packets. You can set the encapsulation mode, destination address, and transmission priority for 1588v2 messages based on networking.

Before setting the encapsulation mode for 1588v2 messages, determine the link type used to transmit 1588v2 messages:

  • If 1588v2 messages are transmitted over a Layer 2 link, run the ptp mac-egress command to configure MAC encapsulation.
  • If 1588v2 messages are transmitted over a Layer 3 link, run the ptp udp-egress command to configure UDP encapsulation.

Multicast MAC encapsulation is used by default. Specify a destination IP address as needed:

  • Specify a destination IP address if unicast UDP encapsulation is used.

  • Use a default destination IP address if multicast UDP encapsulation is used. Table 5-72 lists default multicast IP addresses when different delay measurement mechanisms are used.
    Table 5-72  Default multicast IP addresses used for multicast UDP encapsulation
    Delay Measurement Mechanism Destination IP Address

    Pdelay

    224.0.0.107

    Delay

    224.0.1.129

Prerequisites

A delay measurement mechanism has been specified using the ptp delay-mechanism { delay | pdelay } command.

1588v2 has been enabled on an interface using the ptp enable (interface view) command.

Precautions

1588v2 services require a higher DSCP and priority than other services. A high transmission priority minimizes the delay or congestion impact on clock signal recovery. The default highest DSCP and priority are recommended.

Example

# Encapsulate 1588v2 messages with the source IP address 192.168.2.2 and destination IP address 192.168.1.1 in unicast UDP mode.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] ptp udp-egress  source-ip 192.168.2.2 destination-ip 192.168.1.1 

ptp utc-offset

Function

The ptp utc-offset command sets the accumulative offset between the Universal Coordinated Time (UTC) and International Atomic Time (TAI) on the grandmaster clock.

The undo ptp utc-offset command restores the default setting.

The default accumulative offset is 0s.

Format

ptp utc-offset utc-offset

undo ptp utc-offset

Parameters

Parameter Description Value
utc-offset Specifies the accumulative offset between the UTC time and TAI time. The value is an integer ranging from 0 to 255, in seconds.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The UTC is Greenwich Mean Time (GMT) that is displayed on a 1588v2 device. There is a fixed offset between the UTC and TAI. The International Earth Rotation Service (IERS) periodically advertises the offset.

When 1588v2 devices trace an external clock source, they use the offset provided by the external clock source by default. After signals of the external clock source are lost, they continue to use this offset. If the offset changes, time signals of the entire 1588v2 network may be inaccurate.

To manually set the offset between the UTC time and TAI time, you only need to run the ptp utc-offset command on the grandmaster clock. Other 1588v2 devices only need to synchronize the time with the grandmaster clock.

Prerequisites

1588v2 has been enabled on the device using the ptp enable command.

Configuration Impact

If the ptp utc-offset command is run multiple times, only the latest configuration takes effect.

Example

# Set the accumulative offset between the UTC time and TAI time to 33s.
<HUAWEI> system-view
[~HUAWEI] ptp enable
[*HUAWEI] ptp utc-offset 33

ptp virtual-clock-id

Function

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

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

By default, a 1588v2 device has only a default clock ID and does not have a virtual clock ID.

A clock ID is 8 bytes long. The default clock ID is generated by padding fffe in the middle of the system MAC address. For example, if the system MAC address is 111122223333, the default clock ID is 111122fffe223333.

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.
NOTE:

The four most significant bytes of a virtual clock ID are automatically assigned by the system, while the four least significant bytes are configured by users.

The value is a hexadecimal integer ranging from 00000001 to ffffffff.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A clock ID uniquely identifies a 1588v2 device in a single clock domain. The default clock ID depends on the system MAC address and does not need to be changed in most situations.

If an active/standby MPU switchover is performed or an MPU is replaced, and the previous active MPU is removed from a device and then installed in another device, the default clock IDs of the two devices are the same. To address this issue, run the ptp virtual-clock-id command to set a virtual clock ID for either of the two devices. The configured virtual clock ID uniquely identifies a 1588v2 device and does not change even if an MPU is replaced.

Prerequisites

1588v2 has been enabled on the device using the ptp enable command.

Example

# Set the four least significant bytes of a virtual clock ID to 00000123.

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

reset ptp statistics

Function

The reset ptp statistics command clears statistics about 1588v2 messages received and sent by interfaces.

Format

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

Parameters

Parameter Description Value
all Clears statistics about 1588v2 messages received and sent by all interfaces. -
interface interface-type interface-number Clears statistics about 1588v2 messages received and sent by a specified interface. -

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

During device debugging or maintenance, to check whether a 1588v2 device can implement time synchronization, run the reset ptp statistics command to clear statistics about 1588v2 messages received and sent by a specified interface or all interfaces and then run the display ptp interface interface-type interface-number command to check statistics about 1588v2 messages.

Precautions

1588v2 statistics cannot be restored after being cleared. Exercise caution when running the reset ptp statistics command.

Example

# Clear statistics about 1588v2 messages received and sent by 10GE1/0/1.
<HUAWEI> reset ptp statistics interface 10ge 1/0/1
Related Topics
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 50621

Downloads: 337

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