• PTP slave-passive port election

 
 
Print Friendly, PDF & Email

Scope

This article takes account of how the slave-passive port election for PTP is done on Arista switches.

Slave-Passive port election order

The below sequence of comparison occurs in order to decide if a port should take slave or passive state:

1. Steps removed

2. Parent clock identity

3. Self Port-ID

Steps removed

“Steps removed” is the number of hops separating a PTP clock from the GM. The port that has a lower “steps removed” value is preferred as a slave port. The grandmaster in a PTP domain has a “steps removed” value equivalent to zero. Every subsequent PTP running port in the PTP domain increments the “steps removed” value it receives by one.

Parent clock identity

Parent clock identity is the sender’s PTP clock identity. Lower parent clock identity is preferred in order to elect a port as a slave port.

Self Port-ID

Self Port-ID is the local interface’s port ID. Lower port-ID is preferred for a slave port.

Example

Topology

Configurations

switch-1

ptp priority1 25
ptp domain 1
ptp mode boundary
!
interface Ethernet3
   no switchport
   ip address 30.48.0.48/24
   ptp enable

switch-2

ptp domain 1
ptp mode boundary
!
interface Ethernet1
   no switchport
   ip address 30.31.0.30/24
   ptp enable
!
interface Ethernet2
   no switchport
   ip address 30.48.0.30/24
   ptp enable

switch-3

ptp domain 1
ptp mode boundary
!
interface Ethernet1
   no switchport
   ip address 30.31.0.31/24
   ptp enable

Outputs

switch-1

switch-1(config)#show ptp
PTP Mode: Boundary Clock
Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Number of slave ports: 0
Number of master ports: 1
Mean Path Delay (nanoseconds): 0
Steps Removed: 0
Skew (estimated local-to-master clock frequency ratio): 1.0
   Interface       State        Transport    Delay
                                             Mechanism
--------------- ------------ --------------- ---------
   Et3             Master         ipv4         e2e


switch-1(config)#show ptp parent
Parent Clock:
Parent Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Parent Port Number: 0
Parent IP Address: N/A
Observed Parent Offset (log variance): N/A
Observed Parent Clock Phase Change Rate: N/A

Grandmaster Clock:
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Grandmaster Clock Quality:
   Class: 248
   Accuracy: 0x30
   OffsetScaledLogVariance: 0xffff
   Priority1: 25
   Priority2: 128

switch-2

switch-2(config)#show ptp
PTP Mode: Boundary Clock
PTP Profile: Default ( IEEE1588 )
Clock Identity: 0x00:1c:73:ff:ff:da:4e:e9
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Number of slave ports: 1
Number of master ports: 1
Slave port: Ethernet2
Offset From Master: -145
Mean Path Delay (nanoseconds): 316
Steps Removed: 1
Skew (estimated local-to-master clock frequency ratio): 1.00001281798
Last Sync Time: 05:56:01 UTC Jun 19 2019
Current PTP System Time: 05:56:01 UTC Jun 19 2019
   Interface       State        Transport    Delay
                                             Mechanism
--------------- ------------ --------------- ---------
   Et1             Master         ipv4         e2e
   Et2             Slave          ipv4         e2e

switch-2(config-if-Et2)#show ptp parent
Parent Clock:
Parent Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Parent Port Number: 3
Parent IP Address: 30.48.0.48
Observed Parent Offset (log variance): N/A
Observed Parent Clock Phase Change Rate: N/A

Grandmaster Clock:
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Grandmaster Clock Quality:
   Class: 248
   Accuracy: 0x30
   OffsetScaledLogVariance: 0xffff
   Priority1: 25
   Priority2: 128

switch-3

switch-3(config)#show ptp
PTP Mode: Boundary Clock
Clock Identity: 0x00:1c:73:ff:ff:da:4f:6d
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Number of slave ports: 1
Number of master ports: 0
Slave port: Ethernet1
Offset From Master: -125
Mean Path Delay (nanoseconds): 192
Steps Removed: 2
Skew (estimated local-to-master clock frequency ratio): 1.00001380723
Last Sync Time: 05:58:11 UTC Jun 19 2019
Current PTP System Time: 05:58:11 UTC Jun 19 2019
   Interface       State       Transport    Delay
                                            Mechanism
--------------- ----------- --------------- ---------
   Et1             Slave         ipv4         e2e

switch-3(config)#show ptp parent
Parent Clock:
Parent Clock Identity: 0x00:1c:73:ff:ff:da:4e:e9
Parent Port Number: 1
Parent IP Address: 30.31.0.30
Observed Parent Offset (log variance): N/A
Observed Parent Clock Phase Change Rate: N/A

Grandmaster Clock:
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Grandmaster Clock Quality:
   Class: 248
   Accuracy: 0x30
   OffsetScaledLogVariance: 0xffff
   Priority1: 25
   Priority2: 128

Election based on the “steps removed” value

Topology

Observations

1. The configurations are the same when compared to the previous scenario on the switches except that a new L3 link has been added, directly connecting switch-1 and switch-3 with PTP enabled on them.

switch-1(config-if-Et4)#sh run int et 4
interface Ethernet4
   no switchport
   ip address 31.48.0.48/24
   ptp enable

switch-3(config)#sh run int et 2
interface Ethernet2
   no switchport
   ip address 31.48.0.31/24
   ptp enable

2. In the above scenario, the election gets decided on the basis of “Steps removed” on switch-3 for the slave port.

3. Since the GM is closer via Et2 than Et1 (Lesser steps removed), Ethernet 2 on switch-3 is preferred as the slave port:

switch-3(config)#show ptp
PTP Mode: Boundary Clock
Clock Identity: 0x00:1c:73:ff:ff:da:4f:6d
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Number of slave ports: 1
Number of master ports: 0
Slave port: Ethernet2
Offset From Master: 123
Mean Path Delay (nanoseconds): 253
Steps Removed: 1
Skew (estimated local-to-master clock frequency ratio): 1.00001365919
Last Sync Time: 06:30:34 UTC Jun 19 2019
Current PTP System Time: 06:30:34 UTC Jun 19 2019
   Interface       State       Transport      Delay
                                              Mechanism
--------------- ------------- --------------- ---------
   Et1             Passive     ipv4              e2e
   Et2             Slave       ipv4              e2e

Election based on the parent clock identity

Topology

Observations

1. Switch-4 is a new clock that is introduced into the PTP domain.

ptp domain 1
ptp mode boundary
!
interface Ethernet7
   no switchport
   ip address 24.30.0.24/24
   ptp enable
!
interface Ethernet8
   no switchport
   ip address 24.31.0.24/24
   ptp enable

2. Both switch-2 and switch-3 advertise the same “steps removed” value of 1 to switch-4.

3. Considering this, the slave port election falls back to the parent ID comparison. Since switch-2 has a lower clock ID than switch-3, et7 is preferred as the slave port resulting in et8 to be a passive port on switch-4:

switch-4(config)# show ptp
PTP Mode: Boundary Clock
PTP Profile: Default ( IEEE1588 )
Clock Identity: 0x00:1c:73:ff:ff:8d:e9:7d
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Number of slave ports: 1
Number of master ports: 0
Slave port: Ethernet7
Offset From Master: 7
Mean Path Delay (nanoseconds): 153
Steps Removed: 2
Skew (estimated local-to-master clock frequency ratio): 0.999951829252
Last Sync Time: 08:03:40 UTC Jun 19 2019
Current PTP System Time: 08:03:40 UTC Jun 19 2019
   Interface       State       Transport       Delay
                                              Mechanism
--------------- ------------- --------------- ---------
   Et7             Slave        ipv4            e2e
   Et8             Passive      ipv4            e2e

switch-4(config)#show ptp parent
Parent Clock:
Parent Clock Identity: 0x00:1c:73:ff:ff:da:4e:e9
Parent Port Number: 7
Parent IP Address: 24.30.0.30
Observed Parent Offset (log variance): N/A
Observed Parent Clock Phase Change Rate: N/A

Grandmaster Clock:
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Grandmaster Clock Quality:
   Class: 248
   Accuracy: 0x30
   OffsetScaledLogVariance: 0xffff
   Priority1: 25
   Priority2: 128

Election based on the self port-ID

Topology

Observations

1. Switch-1 remains GM as before.

2. Switch-2 can either chooses et2 or et17 as a slave port.

3. Considering that the “steps removed” and the parent ID is the same for both the ports, the election for the slave port occurs on the basis of the lower port-ID.

4. Due to this, Ethernet 2 is chosen as the slave port:

switch-2(config)#show ptp
PTP Mode: Boundary Clock
PTP Profile: Default ( IEEE1588 )
Clock Identity: 0x00:1c:73:ff:ff:da:4e:e9
Grandmaster Clock Identity: 0x00:1c:73:ff:ff:69:ab:0d
Number of slave ports: 1
Number of master ports: 0
Slave port: Ethernet2
Offset From Master: -36
Mean Path Delay (nanoseconds): 235
Steps Removed: 1
Skew (estimated local-to-master clock frequency ratio): 1.00001248213
Last Sync Time: 04:52:18 UTC Jun 20 2019
Current PTP System Time: 04:52:18 UTC Jun 20 2019
   Interface       State         Transport    Delay
                                              Mechanism
--------------- ------------- --------------- ---------
   Et2             Slave           ipv4         e2e
   Et17            Passive         ipv4         e2e

 

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: