Description

Users may find that the Network Time Protocol (NTP) cannot be synchronized in the mgmt_junos instance on QFX devices. Additionally, even if the NTP synchronization issue is resolved by adding the correct configuration, users may find that the NTP still does not work and that the NTP association output is empty.

This article explains how to resolve both problems by using the correct configuration for NTP.

Symptoms

{master:0}[edit]
root@qfx5120# run show ntp associations    
   remote         refid           st t when poll reach   delay   offset  jitter
===============================================================================
 10.219.0.35      .INIT.          16 -    -   64    0    0.000    0.000 4000.00
 10.219.0.36      .INIT.          16 -    -   64    0    0.000    0.000 4000.00

{master:0}[edit]
root@qfx5120# run show configuration | display set | grep ntp                  
set system ntp server 10.219.0.35
set system ntp server 10.219.0.36
set system ntp source-address 10.219.20.112 routing-instance mgmt_junos

{master:0}[edit]
root@qfx5120# run show interfaces terse em0.0     
Interface               Admin Link Proto    Local                 Remote
em0.0                   up    up   inet     10.219.20.112/26

{master:0}[edit]
root@qfx5120# run ping 10.219.0.35 source 10.219.20.112 routing-instance mgmt_junos  
PING 10.219.0.35 (10.219.0.35): 56 data bytes
64 bytes from 10.219.0.35: icmp_seq=0 ttl=61 time=1.136 ms
64 bytes from 10.219.0.35: icmp_seq=1 ttl=61 time=1.110 ms
64 bytes from 10.219.0.35: icmp_seq=2 ttl=61 time=1.192 ms
64 bytes from 10.219.0.35: icmp_seq=3 ttl=61 time=1.228 ms
64 bytes from 10.219.0.35: icmp_seq=4 ttl=61 time=1.240 ms
^C
--- 10.219.0.35 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.110/1.181/1.240/0.051 ms

Solution

For NTP to be synchronized in the mgmt_junos routing-instance, the routing-instance must be added not only after set system ntp source-address x.x.x.x but also after set system ntp server xx.x.x.

As shown below, the routing-instance mgmt_junos configuration is added after set system ntp source-address x.x.x.x as well as after set system ntp server xx.x.x:

Example

{master:0}[edit]
root@jtac-qfx5120-48y-8c-r2006#  run show configuration | display set | grep ntp                   
set system ntp server 10.219.0.35 routing-instance mgmt_junos 
set system ntp source-address 10.219.20.112 routing-instance mgmt_junos

{master:0}[edit]
root@jtac-qfx5120-48y-8c-r2006# run show ntp associations    
   remote         refid           st t when poll reach   delay   offset  jitter
===============================================================================
*10.219.0.35      66.129.233.81    4 -   12   64    1    0.716   99.273   0.190

Scenario 2

Note that sometimes you may find that the NTP still does not work even with the correct configuration listed above. The NTP association output may be empty.

jtac-qfx5120-48y-8c-r2014# run show configuration | display set | grep ntp 
set system ntp server 10.219.0.35 routing-instance mgmt_junos
set system ntp server 10.219.0.36 routing-instance mgmt_junos
set system ntp source-address 10.219.120.87 routing-instance mgmt_junos

labroot@jtac-qfx5120-48y-8c-r2014# run show ntp associations 

labroot@jtac-qfx5120-48y-8c-r2014# <<< no output

In this case, the reason for NTP malfunction is the absence of an active IP address in the default routing-instance on this node. According to Network Time Protocol, "when configuring the NTP service in the management VRF (mgmt_junos), you must configure at least one IP address on a physical or logical interface within the default routing instance and ensure that this interface is up in order for the NTP service to work with the mgmt_junos VRF."

As you can see, on the jtac-qfx5120-48y-8c-r2014 node, there is no active IP address in the default routing-instance. Therefore, the above NTP issue can be fixed after configuring and assigning an IP address to the lo0.0 interface.

{master:0}[edit]
labroot@jtac-qfx5120-48y-8c-r2014# rollback 1 
load complete

{master:0}[edit]
labroot@jtac-qfx5120-48y-8c-r2014# show | compare 
[edit interfaces]
+   lo0 {
+       unit 0 {
+           family inet {
+               address 192.168.100.1/32;
+           }
+       }
+   }

{master:0}[edit]
labroot@jtac-qfx5120-48y-8c-r2014# run show ntp associations 
   remote         refid           st t when poll reach   delay   offset  jitter
===============================================================================
 10.219.0.35      66.129.233.81    4 -    1   64    1    0.838    0.024   0.031
 10.219.0.36      66.129.233.81    4 -    2   64    1    0.830   -0.211   0.000

Modification History

  • 2022-02-25: Removed specific QFX model number since this applies to QFX series

  • 2023-03-24: Added scenario 2 - NTP may still not work if there's no active IP address in the default routing-instance

Related Information