<br> [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is a widely used method for synchronizing time across devices on a network. Here are two methods for configuring time synchronization on an EXOS switch. <br> ## NTP (Network Time Protocol) The feature of NTP was added to EXOS in version 12.7. From version 12.7 to 15.4, an additional component called NTP XMOD was needed to configure and use the feature. However, starting from EXOS version 15.5, NTP is already included in the standard EXOS image, so there is no need for the NTP XMOD component. <br> ### Step 1. Configure the following commands ``` configure ntp server add clock.sjc.he.net vr VR-Default configure ntp server add time.google.com vr VR-Default enable ntp vr VR-Default enable ntp vlan v100 ``` - Command syntax ``` configure ntp [server | peer] add [ip_address | host_name] {key keyid} {option [burst | initial-burst]} {{vr} vr_name} ``` If no VR is specified, VR-Default will be used by default. <br> ### Step 2. Check NTP association with NTP servers ``` EXOS# show ntp association VR Name Remote Reference ID St Poll Reach Delay Offset Disp ===================== ========================= =============== == ==== ===== ======= ======== ======= VR-Default *!time.google.com .GOOG. 1 1024 377 0.05095 -0.00021 0.12369 VR-Default .!clock.sjc.he.net 162.159.200.123 4 1024 377 0.01360 +0.00061 0.13824 St(ratum) : Distance from the reference clock Disp(ersion): Maximum offset error of clock Flags : (*) System Peer, (.) Candidate, (#) Short List, (!) Configured ``` <br> ### Step 3. Check current time Check the current time with the following command. ``` EXOS # show time Thu Jan 19 19:37:07 PST(UTC-480) 2023 ``` <br> --- ## SNTP (Simple Network Time Protocol) [SNTP](https://timetoolsltd.com/ntp/sntp-overview/) (Simple Network Time Protocol) and NTP (Network Time Protocol) are both used for synchronizing time across devices on a network. NTP is a more robust and accurate protocol, while SNTP is a simplified version that is less accurate but also less resource-intensive. SNTP is typically used for devices with limited processing power, while NTP is used for more critical systems that require precise time synchronization. <br> ### Step 1. Configure the following commands ``` configure sntp-client primary clock.sjc.he.net vr VR-Default configure sntp-client secondary time.google.com vr VR-Default configure sntp-client broadcast vr VR-Default ``` Please change the server name or IP address if you have preferred hosts. <br> - Command syntax ``` configure sntp-client [primary | secondary] host-name-or-ip {vr vr_name} ``` Queries are first sent to the primary server. If the primary server does not respond within 1 second, or if it is not synchronized, the switch queries the second server. If the switch cannot obtain the time, it restarts the query process. Otherwise, the switch waits for the sntp-client update-interval before querying again. <br> ### (Optional) Configure the update interval Change the update interval with the following command if required. ``` EXOS # configure sntp-client update-interval ? <update-interval> update interval in seconds [16-16284]. (Default 64) ``` <br> The following example configures a primary NTP server: ``` configure sntp-client primary 216.218.254.202 ``` <br> The following example configures the primary NTP server to use the management virtual router VR- Mgmt: ``` configure sntp-client primary 216.218.254.202 vr VR-Mgmt ``` <br> ### Step 2. Check SNTP validation with NTP servers ``` EXOS# show sntp-client SNTP client is enabled SNTP time is valid Primary server:clock.sjc.he.net VR-Default Secondary server:time.google.com VR-Default Broadcasts: VR-Default Query interval:64 Last valid SNTP update: From server:clock.sjc.he.net, on Thu Jan 19 19:42:38 2023 SNTPC Statistics: Packets transmitted: to primary server: 1 to secondary server: 0 Packets received with valid time: from Primary server: 1 from Secondary server: 0 from Broadcast server: 0 Packets received without valid time: from Primary server: 0 from Secondary server: 0 from Broadcast server: 0 Replies not received to requests: from Primary server: 0 from Secondary server: 0 ``` <br> ### Step 3. Check current time Check the current time with the following command. ``` EXOS # show time Thu Jan 19 19:37:07 PST(UTC-480) 2023 ``` <br> You may use the ‘show switch’ command to check the current time. ``` EXOS# show switch SysName: X440G2-12p-10G4 SysLocation: Address SysContact: [email protected], +1 888 257 3000 System MAC: 00:04:96:9A:12:XX System Type: X440G2-12p-10G4 SysHealth check: Enabled (Normal) Recovery Mode: All System Watchdog: Enabled Current Time: Thu Jan 19 19:45:53 2023 Timezone: [Auto DST Enabled] GMT Offset: -480 minutes, name is PST. DST of 60 minutes is currently not in effect, name is not set. DST begins every second Sunday March at 2:00 DST ends every first Sunday November at 2:00 ``` <br> --- ## Is it possible to configure NTP and SNTP simultaneously in EXOS? No. It is not possible to configure both SNTP and NTP simultaneously on a device. To enable NTP or switch to using the device as an NTP server, it may be necessary to first disable SNTP. ``` EXOS# enable ntp EXOS# enable sntp-client Error: NTP is already enabled. To use SNTP, please disable NTP at first and then enable SNTP. EXOS# enable sntp-client EXOS# enable ntp Error: SNTP is already enabled. To use NTP, please disable SNTP at first and then enable NTP. ``` <br> ## References [Q A: How to Configure NTP on EXOS switch? | Extreme Portal](https://extremeportal.force.com/ExtrArticleDetail?an=000090227&q=exos%20ntp%20sntp) <br> ## Links [[_MOC_2_Network]] <br>