NTP settings EcoRouter Documentation / NTP settings
NTP (network time protocol) is the protocol of time synchronization in the network.
The NTP synchronizes time on network devices in accordance with UTC (Coordinated Universal Time). This is used to configure security services and logging. The NTP uses a hierarchical level system of time sources. Each level of the system is called "Stratum" and has a certain number. Numbering starts from zero from the top level. Stratum 0 defines the system directly where the source of the exact time is located. The system connected to stratum 0 begins to refer to stratum 1 and so on. The level number determines the distance from the primary source of time.
The protocol is based on UDP and uses port 123.
Each 15 minutes synchronization with the specified NTP server is made.
The NTP configuration commands are presented in the table below.
Command | Description |
---|---|
ntp authentication-key <1-65535> md5 string | Specify the authentication key for server. First parameter is the serial number of the key. The key itself is set in the clear form and stored in an encrypted |
ntp server <server ip address> ... <server ip address> <key> | Specify NTP serever IP address. Multiple server addresses can be specified in the string through a space with the same key number. The the key parameter is optional |
ntp server <server ip address> ... <server ip address> mgmt | Specify the protocol to work only through the management port |
ntp server <server ip address> ... <server ip address> <virtual router name> <key> | Specify the NTP server IP address reacheble through the virtual router and the serial number of the key |
ntp timezone <UTC timezone> | Specify timezone. Possible values are UTC, UTC+1...UTC-12. |
ntp date <yyyy.mm.dd> <hh:mm> | Specify date and time |
Basic configuration
Step 1. The configuring is to be made in configuration mode.
ecorouter>en
ecorouter#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Step 2. Configure server address.
ecorouter(config)#ntp server 89.109.251.21
Step 3. Specify timezone.
ecorouter(config)#ntp timezone ?
utc Greenwich Mean Time, Universal Time (Default)
utc+1 Central European Time
utc+10 Vladivostok Time
utc+11 Magadan Time
utc+12 Kamchatka Time
utc+2 Eastern European Time, Kaliningrad Time
utc+3 Further-eastern European Time, Moscow Time
utc+4 Samara Time
utc+5 Yekaterinburg Time
utc+6 Omsk Time
utc+7 Krasnoyarsk Time
utc+8 Irkutsk Time
utc+9 Yakutsk Time
utc-1 East Greenland Time
utc-10 Hawaii-Aleutian Standard Time
utc-11 Samoa Standard Time
utc-2 South Georgia Time
utc-3 West Greenland Time
utc-4 Atlantic Standard Time
utc-5 Eastern Standard Time
utc-6 Central Standard Time
utc-7 Mountain Standard Time
utc-8 Eastern Standard Time
utc-9 Alaska Standard Time
ecorouter(config)#ntp timezone UTC+3
To apply the result of the ntp timezone command, save the configuration with the write command.
Step 4. Specify current date and time manually.
ecorouter(config)#ntp date 2016.07.01 11:35
The device will use the last specified time. If the time was first specified using the ntp date command, it will be used until the time from the specified ntp server is received.
Show commands
Command | Description |
---|---|
show ntp status | Display ntp servers addresses for sinchronization |
show ntp date | Display current date and time |
show ntp timezone | Display current timezone |
The show ntp status command displays a list of all servers used and the server which the device synchronizes the system time with.
ecorouter#show ntp status
Status Description
* best
+ sync
- failed
-----------------------------------------------------------------------------------------------
Status | VR name | Server | Stratum | Delay | Version | Offset | Last
-----------------------------------------------------------------------------------------------
*| mgmt | 95.104.192.10 | 2 | 0.0441 | 4 | 0.0001 | 6
+| mgmt | 91.206.16.3 | 2 | 0.0639 | 4 | 0.0034 | 0
Synchronization will be performed with the server with the lowest stratum or, if the stratums are equal, with the server having the minimum delay in the echo-request.
The command to display timezone on the device.
ecorouter#show ntp timezone
System Time zone: UTC
The command to display the current date on the device.
ecorouter#show ntp date
Wed Jul 13 12:08:23 UTC 2016