Supported Platforms
Related Documentation
- ACX, EX, J, M, MX, PTX, QFX, SRX, T Series
- NTP Overview
- M, MX, PTX, T Series, QFabric System, QFX Series standalone switches
- Understanding NTP Time Servers
- M, MX, T Series, QFX Series standalone switches
- Example: Configuring NTP as a Single Time Source for Router and Switch Clock Synchronization
Synchronizing and Coordinating Time Distribution Using NTP
Using NTP to synchronize and coordinate time distribution in a large network involves these tasks:
Configuring NTP
To configure NTP on the router or switch, include the ntp statement at the [edit system] hierarchy level:
Configuring the NTP Boot Server
When you boot the router or switch, it issues an ntpdate request, which polls a network server to determine the local date and time. You need to configure a server that the router or switch uses to determine the time when the router or switch boots. If you configure an NTP boot server, then when the router or switch boots, it immediately synchronizes with the boot server even if the NTP process is explicitly disabled or if the time difference between the client and the boot server exceeds the threshold value of 1000 seconds.
To configure the NTP boot server, include the boot-server statement at the [edit system ntp] hierarchy level:
Specify the address of the network server. You must specify an IP address or a hostname.
Specifying a Source Address for an NTP Server
For IP version 4 (IPv4), you can specify that if the NTP server configured at the [edit system ntp] hierarchy level is contacted on one of the loopback interface addresses, the reply always uses a specific source address. This is useful for controlling which source address NTP will use to access your network when it is either responding to an NTP client request from your network or when it itself is sending NTP requests to your network.
To configure the specific source address that the reply will always use, and the source address that requests initiated by NTP server will use, include the source-address statement at the [edit system ntp] hierarchy level:
source-address is a valid IP address configured on one of the router or switch interfaces.
![]() | Note: If a firewall filter is applied on the loopback interface, ensure that the source-address specified for the NTP server at the [edit system ntp] hierarchy level is explicitly included as one of the match criteria in the firewall filter. This enables the Junos OS to accept traffic on the loopback interface from the specified source address. The following example shows a firewall filter with the source address 10.0.10.100 specified in the from statement included at the [edit firewall filter firewall-filter-name] hierarchy: [edit firewall filter Loopback-Interface-Firewall-Filter] term Allow-NTP {from {source-address {172.17.27.46/32; // IP address of the NTP server10.0.10.100/32; // Source address specified for the NTP server}then accept;}} If no source-address is configured for the NTP server, include the primary address of the loopback interface in the firewall filter. |
Related Documentation
- ACX, EX, J, M, MX, PTX, QFX, SRX, T Series
- NTP Overview
- M, MX, PTX, T Series, QFabric System, QFX Series standalone switches
- Understanding NTP Time Servers
- M, MX, T Series, QFX Series standalone switches
- Example: Configuring NTP as a Single Time Source for Router and Switch Clock Synchronization
Published: 2014-04-22
Supported Platforms
Related Documentation
- ACX, EX, J, M, MX, PTX, QFX, SRX, T Series
- NTP Overview
- M, MX, PTX, T Series, QFabric System, QFX Series standalone switches
- Understanding NTP Time Servers
- M, MX, T Series, QFX Series standalone switches
- Example: Configuring NTP as a Single Time Source for Router and Switch Clock Synchronization