This section describes how to configure basic NTP functions.
Usage Scenario
Select a proper mode based on the networking topology to meet various clock synchronization requirements.
In mode and peer mode, NTP packets can have the same source IP address.
Table 1 shows the NTP operating modes that the NetEngine 8000 F supports.
Table 1 NTP operating modeOperating Mode
|
Location and Synchronization Direction
|
Working Principle
|
Client/server mode
|
Configure NTP only on the client. The server needs to be configured only with one NTP master clock and listening interfaces.
The client can be synchronized with the server but the server cannot be synchronized with the client.
|
The client sends a synchronization request packet to the server, with the mode field set to 3. The value 3 indicates the client mode.
Upon receiving the request packet, the server automatically works in the server mode and sends a response packet with the mode field being set to 4. The value 4 indicates the server mode.
After receiving the response packet, the client performs clock filtering and selection, and finally, is synchronized with the optimal server.
|
Peer mode
|
Configure NTP only on the symmetric active end. The symmetric active end and symmetric passive end can be synchronized.
The end with a lower stratum (larger stratum number) is synchronized to the end with a higher stratum (smaller stratum number).
|
The symmetric active end sends a synchronization request packet to the symmetric passive end with the mode field being set to 1. (The value 1 indicates the symmetric active mode.)
Upon receiving the request packet, the symmetric passive end automatically works in symmetric passive mode and sends a response packet with the mode field being set to 2. (The value 2 indicates the symmetric passive mode.) Symmetric passive also forms a dynamic session with symmetric active.
|
Broadcast mode
|
Configure NTP on both the server and the client.
The client can be synchronized with the server but the server cannot be synchronized with the client.
|
The server periodically sends clock-synchronization packets to the broadcast address 255.255.255.255.
The client listens to the broadcast packets from the server.
After receiving the first broadcast packet, the client temporarily starts in the client/server mode to exchange packets with the server. This allows the client to estimate the network delay.
The client then reverts to the broadcast mode, continues to listen to the broadcast packets, and re-synchronizes the local clock according to the received broadcast packets.
|
Multicast mode
|
Configure NTP on both the server and the client.
The client can be synchronized with the server but the server cannot be synchronized with the client.
|
The server periodically sends clock-synchronization packets to the configured multicast IP address.
The client listens to the multicast packets sent from the server.
After receiving the first multicast packet, the client temporarily starts in the client/server mode to exchange packets with the server. This allows the client to estimate the network delay.
The client then reverts to the multicast mode, continues to listen to the multicast packets, and re-synchronizes the local clock according to the received multicast packets.
|
Manycast mode
|
Configure NTP on both the server and the client.
The client can be synchronized with the server but the server cannot be synchronized with the client.
|
- A client operating in manycast mode sends periodic request packets to a designated IPv4/IPv6 multicast address in order to search for a minimum number of associations. It starts with a time to live (TTL) value equal to one and continuously adding one to it until the minimum number of associations is made, or when the TTL reaches a maximum value. If the TTL reaches its maximum value, and still not enough associations are mobilized, the client stops transmission for a timeout period to clear all associations, and then repeats the search process. If a minimum number of associations have been mobilized, then the client starts transmitting one packet per timeout period to maintain the associations.
- A designated manycast server within range of the TTL field in the packet header listens for packets with that address. If server synchronization is possible, the server will return a packet with the Mode field set to 4 using the unicast address of the client as the destination address.
|
Pre-configuration Tasks
Before configuring basic NTP functions, complete the following tasks: