Description

This article describes the issue of the client being unable to sync to a SRX device, when it is connected to a local NTP source.

Symptoms

Topology :
Local NTP source(192.168.1.2)---(192.168.1.1)[SRX-A as a NTP server](192.168.2.1)---(192.168.2.2)[SRX-B as a NTP client]


Configuration snippet:

SRX-A :
set system ntp server 192.168.1.2
SRX-B :
set system ntp server 192.168.2.1

Issue :

SRX-A is able to sync with the local NTP server:
root@SRX-A> set date ntp
5 Jul 10:14:53 ntpdate[5454]: step time server
172.22.145.21 offset -266.022102 sec
But, SRX-B is unable to obtain the NTP date:
root@Desktop_SRX-B> set date ntp
5 Jul 10:19:45 ntpdate[86968]: no server
suitable for synchronization found

Solution

The behavior of SRX-B is expected, when the local NTP source is completely isolated from internet. In this case, the NTP data from the local NTP source will be considered as a non-reliable one and the NTP stratum will be 16, which is considered to be un-synchronized.

On the SRX-A:

root@SRX-A> set date ntp
5 Jul 10:14:53 ntpdate[5454]: step time server 192.168.1.2  offset -266.022102 sec

root@SRX-A> show ntp status
status=c011 sync_alarm, sync_unspec, 1 event, event_restart,
version="ntpd 4.2.0-a Fri Mar 30 19:54:20 UTC 2012 (1)",
processor="octeon", system="JUNOS11.4R2-S1.2", leap=11, stratum=16, < stratum 16 is considered to be an un-synchronized source
precision=-17, rootdelay=0.000, rootdispersion=0.105, peer=0,
refid=INIT, reftime=00000000.00000000 Wed, Feb 6 2036 22:28:16.000,
poll=4, clock=d3a04a14.a55e657b Thu, Jul 5 2012 10:15:00.645, state=1,
offset=0.000, frequency=40.320, jitter=0.008, stability=0.000


root@SRX-B> set date ntp
5 Jul 10:19:45 ntpdate[86968]: no server suitable for synchronization found < could not get NTP data

root@Desktop_SRX-B> show ntp status
status=c011 sync_alarm, sync_unspec, 1 event, event_restart,
version="ntpd 4.2.0-a Thu Sep 8 06:31:49 UTC 2011 (1)",
processor="octeon", system="JUNOS10.4R7.5", leap=11, stratum=16, < stratum 16 is considered to be a un-synchronized source
precision=-17, rootdelay=0.000, rootdispersion=0.060, peer=0,
refid=INIT, reftime=00000000.00000000 Wed, Feb 6 2036 22:28:16.000,
poll=4, clock=d3a04b36.179d7980 Thu, Jul 5 2012 10:19:50.092, state=1,
offset=0.000, frequency=12.830, jitter=0.008, stability=0.000


There are two solutions:

  • Sync the local NTP source with a public NTP source on the internet, which has lower stratum.

    For example, the local NTP source is synced with the 0.north-america.pool.ntp.org public NTP source:
    root@SRX-A> show ntp status
    status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
    version="ntpd 4.2.0-a Fri Mar 30 19:54:20 UTC 2012 (1)",
    processor="octeon", system="JUNOS11.4R2-S1.2", leap=00, stratum=4, < Not 16, so it is considered to be synced data
    precision=-17, rootdelay=27.046, rootdispersion=210.617, peer=41252,
    refid=192.168.1.2,
    reftime=d3a078bf.e4c70ee1 Thu, Jul 5 2012 13:34:07.893, poll=6,
    clock=d3a078d4.18604395 Thu, Jul 5 2012 13:34:28.095, state=4,
    offset=0.350, frequency=46.157, jitter=1.010, stability=0.004

    root@SRX-A> set date ntp
    5 Jul 13:34:32 ntpdate[6483]: step time server 192.168.1.2 offset 0.003068 sec


    root@SRX-B> show ntp status
    status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
    version="ntpd 4.2.0-a Thu Sep 8 06:31:49 UTC 2011 (1)",
    processor="octeon", system="JUNOS10.4R7.5", leap=00, stratum=5,
    precision=-17, rootdelay=70.333, rootdispersion=891.395, peer=19332,
    refid=192.168.2.1,
    reftime=d3a077d5.3525383b Thu, Jul 5 2012 13:30:13.207, poll=4,
    clock=d3a078c1.12e71cef Thu, Jul 5 2012 13:34:09.073, state=2,
    offset=0.230, frequency=16.692, jitter=0.713, stability=0.001

    root@SRX-B> set date ntp
    5 Jul 13:30:00 ntpdate[87778]: step time server 192.168.2.1 offset -0.000166 sec < the client is able to get NTP data
    Or sync SRX-A with a NTP source, which has lower stratum:

    SRX-A:
    set system ntp 0.north-america.pool.ntp.org


    root@SRX-A> show ntp status
    status=4644 leap_add_sec, sync_ntp, 4 events, event_peer/strat_chg,
    version="ntpd 4.2.0-a Fri Mar 30 19:54:20 UTC 2012 (1)",
    processor="octeon", system="JUNOS11.4R2-S1.2", leap=01, stratum=5,
    precision=-17, rootdelay=107.555, rootdispersion=59.271, peer=18692,
    refid=173.193.227.67,
    reftime=d3a09637.91bf90c2 Thu, Jul 5 2012 15:39:51.569, poll=4,
    clock=d3a09638.289df589 Thu, Jul 5 2012 15:39:52.158, state=2,
    offset=2.193, frequency=-10.915, jitter=3.494, stability=0.016

    root@SRX-A> set date ntp
    5 Jul 15:40:12 ntpdate[6901]: step time server 173.193.227.67 offset 0.000411 sec

    root@SRX-B> show ntp status
    status=4644 leap_add_sec, sync_ntp, 4 events, event_peer/strat_chg,
    version="ntpd 4.2.0-a Thu Sep 8 06:31:49 UTC 2011 (1)",
    processor="octeon", system="JUNOS10.4R7.5", leap=01, stratum=6,
    precision=-17, rootdelay=113.362, rootdispersion=558.281, peer=16628,
    refid=192.168.2.1,
    reftime=d3a0968d.a1083f90 Thu, Jul 5 2012 15:41:17.629, poll=4,
    clock=d3a09697.fc0f0a2f Thu, Jul 5 2012 15:41:27.984, state=2,
    offset=-0.323, frequency=175.833, jitter=1.308, stability=0.001

    root@SRX-B> set date ntp
    5 Jul 15:40:55 ntpdate[88191]: step time server 192.168.2.1 offset 0.065166 sec
  • Manipulate the stratum on the local NTP source to make it smaller than 16. In this example, an Ubuntu server was used in the lab. In /etc/ntp.conf , the following parameters were added to set the local stratum as 10 , when the internet is unavailable to sync with the public NTP servers:

    • server 127.127.1.0
    • fudge 127.127.1.0 stratum 10

    root@SRX-A> show ntp status
    status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
    version="ntpd 4.2.0-a Fri Mar 30 19:54:20 UTC 2012 (1)",
    processor="octeon", system="JUNOS11.4R2-S1.2", leap=00, stratum=12,
    precision=-17, rootdelay=2.587, rootdispersion=960.206, peer=9428,
    refid=192.168.1.2,
    reftime=d3a09d4b.ad8548d0 Thu, Jul 5 2012 16:10:03.677, poll=4,
    clock=d3a09dd5.6f7beb66 Thu, Jul 5 2012 16:12:21.435, state=2,
    offset=0.479, frequency=-10.822, jitter=3.746, stability=0.062

    root@SRX-A> set date ntp
    5 Jul 16:12:35 ntpdate[7342]: step time server 192.168.1.2 offset 0.027760 sec


    root@SRX-B> show ntp status
    status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
    version="ntpd 4.2.0-a Thu Sep 8 06:31:49 UTC 2011 (1)",
    processor="octeon", system="JUNOS10.4R7.5", leap=00, stratum=13,
    precision=-17, rootdelay=8.124, rootdispersion=828.206, peer=1116,
    refid=192.168.2.1,
    reftime=d3a09df8.f2e7cc0a Thu, Jul 5 2012 16:12:56.948, poll=4,
    clock=d3a09df9.33401319 Thu, Jul 5 2012 16:12:57.200, state=2,
    offset=-1.678, frequency=175.822, jitter=1.226, stability=0.007

    root@SRX-B> set date ntp
    5 Jul 16:12:47 ntpdate[88427]: step time server 192.168.2.1 offset -0.116685 sec