07-27-2015 03:47 AM
Hello,
I configured ASR9K to be PTP slave and an OSA 5411(which has external GPS connected) as PTP master and I want to confiugure NTP on ASR9K to have the time source derived from PTP.
Bellow is my config:
RP/0/RSP0/CPU0:R4#sh run ptp
Mon Jul 27 13:28:45.084 EET
ptp
clock
domain 4
priority1 1
priority2 128
timescale PTP
time-source NTP
clock-class 1
!
profile PTP
transport ipv4
master ipv4 150.1.1.1
priority 1
!
sync frequency 128
announce timeout 10
delay-request frequency 128
!
frequency priority 1
time-of-day priority 1
log
servo events
best-master-clock changes
RP/0/RSP0/CPU0:R4#sh run int gi0/2/0/19
Mon Jul 27 13:28:59.322 EET
interface GigabitEthernet0/2/0/19
description Link to OSA5411
ptp
transport ipv4
port state slave-only
sync timeout 1000
master ipv4 150.1.1.1
priority 1
!
!
ipv4 address 150.1.1.2 255.255.255.0
negotiation auto
load-interval 30
transceiver permit pid all
ntp
master primary-reference-clock
update-calendar
log-internal-sync
I see that the int gi0/2/0/19 is slave but the NTP synchronized for 10 minutes and after that lost synchronization.
The card used is MPA 20x1GE and MOD80.I do not have MOBILE-LIC but for test purposes it should work.
RP/0/RSP0/CPU0:R4# sh log | i NTP
Mon Jul 27 13:32:43.539 EET
LC/0/2/CPU0:Jul 24 19:05:07.432 : ntpdc[216]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : DLRSC node : The clock was stepped and needs to be resynced
RP/0/RSP0/CPU0:Jul 24 21:14:27.272 : ntpd[266]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 15->0.
RP/0/RSP0/CPU0:Jul 24 21:57:33.056 : ntpd[266]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 127.127.45.1 : Peer unreachable or clock selection failed
RP/0/RSP0/CPU0:Jul 24 21:57:33.056 : ntpd[266]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 0->15.
RP/0/RSP0/CPU0:Jul 24 21:57:33.056 : ntpd[266]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.
RP/0/RSP0/CPU0:Jul 25 04:32:44.894 : ntpd[266]: %IP-IP_NTP-5-HP_CONN_RECOVERED : High priority NTP peer connection recovered - Stratum 15->0.
RP/0/RSP0/CPU0:Jul 25 04:49:59.801 : ntpd[266]: %IP-IP_NTP-5-SYNC_LOSS : Synchronization lost : 127.127.45.1 : Peer unreachable or clock selection failed
RP/0/RSP0/CPU0:Jul 25 04:49:59.801 : ntpd[266]: %IP-IP_NTP-5-HP_CONN_LOST : High priority NTP peer connection lost - Stratum 0->15.
RP/0/RSP0/CPU0:Jul 25 04:49:59.801 : ntpd[266]: %IP-IP_NTP-5-ALL_CONN_LOST : All NTP peer connections failed.
RP/0/RSP0/CPU0:R4#
RP/0/RSP0/CPU0:R4# sh ptp interfaces
Mon Jul 27 13:32:58.866 EET
GigabitEthernet0/2/0/19 is in Slave state
PTP port number: 1
IPv4 transport: IPv4 address 150.1.1.2
Linestate: Up
Mechanism: Two-step delay-request-response
Sync rate: every second
Announce rate: every 2 seconds, timeout 3 intervals
Min Delay-Request rate: every second
CoS: General 6, Event 6, DSCP: General 46, Event 46
Platform capabilities:
Supported: One-step, Two-step, IPv4, Unicast, Master, Slave
Not-supported: Ethernet, Multicast, IPv6, Source IP
Max-Sync-rate: 128 per second
Slave state only
Master table:
(K = Known, Q = Qualified, GM = Grandmaster,
LA = PTSF LossAnnounce, LS = PTSF LossSync)
IPv4-address 150.1.1.1: priority 1, K,Q,GM
0 Unicast peers
RP/0/RSP0/CPU0:R4#sh ntp trace last 10
Mon Jul 27 13:33:08.480 EET
4237 wrapping entries (7232 possible, 5440 allocated, 0 filtered, 238152 total)
Jul 27 13:25:42.270 ip-ntp/internal 0/RSP0/CPU0 t1 refclock_ptp_event_handler: ptp clock source not in sync, NO_PTP_TOD_SOURCE
Jul 27 13:26:46.389 ip-ntp/internal 0/RSP0/CPU0 2465# t1 refclock_ptp_event_handler: ptp clock source not in sync, NO_PTP_TOD_SOURCE
Jul 27 13:27:48.550 ip-ntp/internal 0/RSP0/CPU0 t1 Rx node0_2_CPU0, sy=0 st=14, po=7, rftm=13:26:33.527 Tx rtdisp=0 rfid=7b000000
Jul 27 13:27:51.509 ip-ntp/internal 0/RSP0/CPU0 t1 refclock_ptp_event_handler: ptp clock source not in sync, NO_PTP_TOD_SOURCE
Jul 27 13:28:56.629 ip-ntp/internal 0/RSP0/CPU0 t1 refclock_ptp_event_handler: ptp clock source not in sync, NO_PTP_TOD_SOURCE
Jul 27 13:29:57.680 ip-ntp/internal 0/RSP0/CPU0 t1 Rx node0_2_CPU0, sy=0 st=14, po=7, rftm=21:00:57.495 Tx rtdisp=0 rfid=7b000000
Jul 27 13:29:59.746 ip-ntp/internal 0/RSP0/CPU0 t1 refclock_ptp_event_handler: ptp clock source not in sync, NO_PTP_TOD_SOURCE
Jul 27 13:31:04.866 ip-ntp/internal 0/RSP0/CPU0 2470# t1 refclock_ptp_event_handler: ptp clock source not in sync, NO_PTP_TOD_SOURCE
Jul 27 13:32:07.811 ip-ntp/internal 0/RSP0/CPU0 t1 Rx node0_2_CPU0, sy=0 st=14, po=7, rftm=20:39:37.700 Tx rtdisp=0 rfid=7b000000
Jul 27 13:32:07.982 ip-ntp/internal 0/RSP0/CPU0 t1 refclock_ptp_event_handler: ptp clock source not in sync, NO_PTP_TOD_SOURCE
Bellow is the output collected when the NTP was syncronized:
RP/0/RSP0/CPU0:R4#sh ntp associations detail
Tue Jul 21 16:09:12.553 EET
127.127.45.1 configured, our_master, stratum 0
ref ID .PTP., time D958C2F0.F7041823 (16:09:04.964 EET Tue Jul 21 2015)
our mode active, peer mode passive, our poll intvl 64, peer poll intvl 64
root delay 0.0000 msec, root disp 0.00, reach 377, sync dist 5.4807
delay 0.00 msec, offset -0.850 msec, dispersion 1.899
precision 2**10, version 4
org time D958C2F0.F73BC7DB (16:09:04.965 EET Tue Jul 21 2015)
rcv time D958C2F0.F73BC7DB (16:09:04.965 EET Tue Jul 21 2015)
xmt time D958C2F0.F73BC7DB (16:09:04.965 EET Tue Jul 21 2015)
filtdelay = 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
filtoffset = -0.850 -0.892 -0.925 -0.956 -0.990 -1.023 -1.057 -1.090
filterror = 0.977 1.937 2.897 3.842 4.832 5.792 6.767 7.742
RP/0/RSP0/CPU0:R4# sh cl
class-map cli clns clock
RP/0/RSP0/CPU0:R4# sh con
% Ambiguous command: " sh con"
RP/0/RSP0/CPU0:R4#sh clock
Tue Jul 21 16:09:23.545 EET
16:09:23.550 EET Tue Jul 21 2015
RP/0/RSP0/CPU0:R4#sh ntp associations
Tue Jul 21 16:09:26.821 EET
address ref clock st when poll reach delay offset disp
*~127.127.45.1 .PTP. 0 21 64 377 0.00 -0.850 1.899
* sys_peer, # selected, + candidate, - outlayer, x falseticker, ~ configured
RP/0/RSP0/CPU0:R4#sh ntp associations
Tue Jul 21 16:21:17.049 EET
address ref clock st when poll reach delay offset disp
~127.127.45.1 .PTP. 0 666 64 0 0.00 0.000 16000
* sys_peer, # selected, + candidate, - outlayer, x falseticker, ~ configured
RP/0/RSP0/CPU0:R4#sh clock
Tue Jul 21 16:21:19.331 EET
16:21:19.336 EET Tue Jul 21 2015
And bellow are the logs regarding PTP:
150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 07:23:57.061 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 07:34:14.067 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 07:34:22.074 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 07:48:02.062 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 07:48:15.067 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 07:59:38.067 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 08:05:40.052 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 08:15:52.061 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 08:27:38.063 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 08:34:52.060 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 08:36:46.047 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 08:47:13.054 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 08:53:17.045 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 08:53:58.050 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 09:04:02.053 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 09:10:06.048 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 09:24:18.047 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 09:34:49.046 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 09:41:41.047 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 09:46:21.040 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 09:56:40.035 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 09:57:16.042 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:07:31.043 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:11:06.044 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:21:17.033 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:22:46.030 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:32:59.029 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:39:03.039 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:41:26.028 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:51:30.434 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 10:57:33.034 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 11:00:34.036 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 11:10:42.033 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 11:12:47.019 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 11:22:50.017 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 11:30:14.031 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 12:09:01.716 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_REMOVED : A best master clock is no longer available
RP/0/RSP0/CPU0:Jul 27 12:09:10.217 : ptp_ctrlr[1114]: %L2-PTP-6-BEST_MASTER_CLOCK_CHANGE : Best master clock change, new master IPv4 150.1.1.1, clock ID 0xfe4dd600
RP/0/RSP0/CPU0:Jul 27 12:09:26.442 : ptp_ctrlr[1114]: %PLATFORM-PTP-6-SERVO_EVENTS : PTP Servo state transition from state PHASE_LOCKED to state REF_FAILED
RP/0/RSP0/CPU0:Jul 27 12:10:18.918 : ptp_ctrlr[1114]: %PLATFORM-PTP-6-SERVO_EVENTS : PTP Servo state transition from state REF_FAILED to state ACQUIRING
RP/0/RSP0/CPU0:Jul 27 12:26:55.966 : ptp_ctrlr[1114]: %PLATFORM-PTP-6-SERVO_EVENTS : PTP Servo state transition from state ACQUIRING to state FREQ_LOCKED
RP/0/RSP0/CPU0:R4#
Thank you,
John
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide