NTP question

Hi,

 

if we have the following scenario:

 

HQ synchronises its time with an external source

Br1 synchronises its time with HQ

Br2 synchronises its ti e with HQ

CUCM synchronises with HQ

 

The following config works fine for me:

 

HQ:

 

clock timezone ....

ntp server <external source>

ntp update-calendar

ntp source-interface loopback 0

 

Br1 and Br2:

clock timezone ....

ntp server <HQ loopback 0 IP address>

ntp update-calendar

ntp source-interface loopback 0

 

In CUCM Pub in OS page add ntp server pointing to HQ's loppback 0 IP address.

 

The above seems to be working fine, though it does take up to 20 min for all components to syunchronise.

 

My question is: Why do we need the 'ntp master' command at HQ router? I tried adding the command under the HQ router configuration with a high stratum 'ntp master 12', however after reloading the HQ router always synchronises with itself even though the external source is with stratum 2. Seems that the 'ntp master' command always takes precedence over 'ntp server' in the synchronisation process.

 

Any thoughts?

 

Comments







  • Hi,

     

    Your config seems correct, but what does the “sh ntp assoiation” command
    give you a an output?

     

    I understand the “ntp master” as a command to liste the router as an
    authorotative source ( a source other can trust).

    You might take a look at the following docs:



     

     

    Lasse



     


    From: cciepres

    Sent: Saturday, February 05, 2011 7:56 AM


    Subject: [CCIE Voice] NTP question

     

    Hi,

     

    if we have the following scenario:

     

    HQ synchronises its time with an external source

    Br1 synchronises its time with HQ

    Br2 synchronises its ti e with HQ

    CUCM synchronises with HQ

     

    The following config works fine for me:

     

    HQ:

     

    clock timezone ....

    ntp server <external source>

    ntp update-calendar

    ntp source-interface loopback 0

     

    Br1 and Br2:

    clock timezone ....

    ntp server <HQ loopback 0 IP address>

    ntp update-calendar

    ntp source-interface loopback 0

     

    In CUCM Pub in OS page add ntp server pointing to HQ's loppback 0 IP
    address.

     

    The above seems to be working fine, though it does take up to 20 min for all
    components to syunchronise.

     

    My question is: Why do we need the 'ntp master' command at HQ router? I tried
    adding the command under the HQ router configuration with a high stratum 'ntp
    master 12', however after reloading the HQ router always synchronises with
    itself even though the external source is with stratum 2. Seems that the 'ntp
    master' command always takes precedence over 'ntp server' in the synchronisation
    process.

     

    Any thoughts?

     




    Internetwork
    Expert - The Industry Leader in CCIE
    Preparation
    http://www.internetworkexpert.com

    Subscription information
    may be found
    at:
    http://www.ieoc.com/forums/ForumSubscriptions.aspx






  • And by the way:

    Sometimes it might be “smart” to manually set the time to something close
    to the correct time. This way it synchronizes a bit faster (a ntp adjusts in
    increments (bit by bit). The closer to “correct” time you start, the faster it
    sync up complete)

     

    Lasse



     


    From: cciepres

    Sent: Saturday, February 05, 2011 7:56 AM


    Subject: [CCIE Voice] NTP question

     

    Hi,

     

    if we have the following scenario:

     

    HQ synchronises its time with an external source

    Br1 synchronises its time with HQ

    Br2 synchronises its ti e with HQ

    CUCM synchronises with HQ

     

    The following config works fine for me:

     

    HQ:

     

    clock timezone ....

    ntp server <external source>

    ntp update-calendar

    ntp source-interface loopback 0

     

    Br1 and Br2:

    clock timezone ....

    ntp server <HQ loopback 0 IP address>

    ntp update-calendar

    ntp source-interface loopback 0

     

    In CUCM Pub in OS page add ntp server pointing to HQ's loppback 0 IP
    address.

     

    The above seems to be working fine, though it does take up to 20 min for all
    components to syunchronise.

     

    My question is: Why do we need the 'ntp master' command at HQ router? I tried
    adding the command under the HQ router configuration with a high stratum 'ntp
    master 12', however after reloading the HQ router always synchronises with
    itself even though the external source is with stratum 2. Seems that the 'ntp
    master' command always takes precedence over 'ntp server' in the synchronisation
    process.

     

    Any thoughts?

     




    Internetwork
    Expert - The Industry Leader in CCIE
    Preparation
    http://www.internetworkexpert.com

    Subscription information
    may be found
    at:
    http://www.ieoc.com/forums/ForumSubscriptions.aspx
  • I am away from the lab today, will post the output from the 'show ntp associations' command tomorrow. As to the speed of ntp synchronisation, I have experimented using different approaches like changing the default version 4 to version 3 (tends to converge much quicker 2-3 minutes) or adding the burst or iburst command at the end of the ntp server command. However, I don't want to introduce any potential setbacks during the lab exam (mine is coming at the end of the month), especially given that it is unlikely we will have any access to any external ntp source that may (or may not) be required such as the PSTN router for example (I am using the PSTN router as an external ntp source in my lab - configured as ntp master 2).   At the end of the day, as long as the synchronisation does happen within 20 minutes and the commands are correct there shouldn't be any issue.

     

    My question is though, under the above configuration scenario, do we need the 'ntp master' command at all at the HQ router? I watched one of Mark's presentation on the topic and he said that for a device to give a time it has to be configured as an ntp server, i.e. the command 'ntp master' is required in the running config. Everything seems to be working fine without it though for the above scenario. However, if there is the requirement for backup in case the connection between the HQ router and the external source goes down, then the 'ntp master' command will be required, otherwise the HQ router will become unsynchronised and so will the Br1 and Br2 routers. 

     

    So to cater for the above possibility, as well as perhaps if there is a requirement for ntp authentication, I added the command 'ntp master' to the HQ router. At that point in time the HQ router was synchronised with my PSTN router and the Br1 and Br2 routers were synchronised with the HQ router (I will post the 'show ntp associations' command tomorrow). The stratum showing under the HQ router's 'show ntt associations' command was 3 since the 'ntp master 2' command was configured on the PSTN router. With 'ntp master' issued at the HQ router, effectively a second ntp source was showing with stratum 8, but the HQ router was still synchronised with the PSTN router as this source was with a lower stratum. So far so good and it did make sense to me. However, after a reload, the HQ router would always synchronise with itself first under stratum 8 and would never synchronise with the PSTN router even though the PSTN router had a lower stratum.

     

    Long reply, but I am really trying to understand the logic behind this. It appears to me that if you configure both 'ntp server' and 'ntp master' on the same router, after a reload the router will always synchronise with itself and that will never change even if the 'ntp server' points to an ntp master source with a lower stratum. Which effectively means that there is no point of configuring both commands on the same device. But then what should we do if they want us to make sure that no synchronisation is lost in case of lost connection to the external ntp source and still the HQ router is to be the one providing the clock to the other lab components?

  • This is the output from the routers without the 'ntp master' command.

     

    HQ_Router#show ntp associations

      address         ref clock       st   when   poll reach  delay  offset   disp
    *~10.1.1.252      127.127.1.1      2    221   1024   377  0.000  -0.004 14.835
     * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured

    HQ_Router#show ntp status
    Clock is synchronized, stratum 3, reference is 10.1.1.252
    nominal freq is 250.0000 Hz, actual freq is 250.0001 Hz, precision is 2**24
    reference time is D0F9E8AA.A74B522E (19:42:34.653 PST Sun Feb 6 2011)
    clock offset is -0.0000 msec, root delay is 0.00 msec
    root dispersion is 0.01 msec, peer dispersion is 0.01 msec
    loopfilter state is 'CTRL' (Normal Controlled Loop), drift is -0.000000511 s/s
    system poll interval is 1024, last update was 274 sec ago.



    Branch1_Router#show ntp associations

      address         ref clock       st   when   poll reach  delay  offset   disp
    *~10.10.1.254    10.1.1.252       3    221   1024   377  0.000   0.199 14.783
     * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured

    Branch1_Router#show ntp status
    Clock is synchronized, stratum 4, reference is 10.10.1.254
    nominal freq is 250.0000 Hz, actual freq is 250.0020 Hz, precision is 2**24
    reference time is D0F9E903.AE0EA82B (21:44:03.679 CST Sun Feb 6 2011)
    clock offset is 0.0001 msec, root delay is 0.00 msec
    root dispersion is 0.03 msec, peer dispersion is 0.01 msec
    loopfilter state is 'CTRL' (Normal Controlled Loop), drift is -0.000008091 s/s
    system poll interval is 1024, last update was 243 sec ago.

    Branch2_Router#show ntp associations

      address         ref clock       st   when   poll reach  delay  offset   disp
    *~10.10.1.254    10.1.1.252       3     12   1024   377  0.000   0.200 18.666
     * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured


    Branch2_Router#show ntp status
    Clock is synchronized, stratum 4, reference is 10.10.1.254
    nominal freq is 250.0000 Hz, actual freq is 250.0024 Hz, precision is 2**24
    reference time is D0F9E209.7FC3CB37 (11:14:17.499 HKT Mon Feb 7 2011)
    clock offset is 0.0002 msec, root delay is 0.00 msec
    root dispersion is 0.09 msec, peer dispersion is 0.01 msec
    loopfilter state is 'CTRL' (Normal Controlled Loop), drift is -0.000009569 s/s
    system poll interval is 1024, last update was 2086 sec ago.

Sign In or Register to comment.