NTP
NTP (Network Time Protocol) maintains accurate and consistent time synchronization across NX-OS devices by synchronizing with authoritative time sources through configurable server and peer relationships. It supports authentication for time source integrity, master mode with stratum configuration for local time authority, passive mode, and logging with adjustable severity levels for time synchronization events. NTP server and peer entries provide granular control over VRF assignment, key-based authentication, preferred source selection, and configurable minimum/maximum polling intervals.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ntp | Class | [ntp] | No |
ntp (nxos.devices.configuration)
Section titled “ntp (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| authenticate | Boolean | true, false | No | |
| logging | Boolean | true, false | No | |
| logging_level | Choice | emergency, alert, critical, error, warning, notif, inform, debug | No | |
| master | Boolean | true, false | No | |
| master_stratum | Integer | min: 1, max: 15 | No | |
| passive | Boolean | true, false | No | |
| allow_control | Boolean | true, false | No | |
| allow_private | Boolean | true, false | No | |
| allow_control_rate_limit | Integer | min: 1, max: 65535 | No | |
| servers | List | [servers] | No | |
| peers | List | [peers] | No |
servers (nxos.devices.configuration.ntp)
Section titled “servers (nxos.devices.configuration.ntp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | String | Yes | ||
| vrf | String | No | ||
| key | Integer | min: 1, max: 65535 | No | |
| prefer | Boolean | true, false | No | |
| min_poll | Integer | min: 4, max: 16 | No | |
| max_poll | Integer | min: 4, max: 16 | No |
peers (nxos.devices.configuration.ntp)
Section titled “peers (nxos.devices.configuration.ntp)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip | String | Yes | ||
| vrf | String | No | ||
| key | Integer | min: 1, max: 65535 | No | |
| prefer | Boolean | true, false | No | |
| min_poll | Integer | min: 4, max: 16 | No | |
| max_poll | Integer | min: 4, max: 16 | No |
Examples
Section titled “Examples”Example 1: Basic NTP with redundant time servers
nxos: devices: - name: LEAF1 configuration: ntp: logging: true servers: - ip: 10.50.100.1 prefer: true vrf: management - ip: 10.50.100.2 vrf: managementExample 2: NTP with authentication enabled for secure time synchronization
nxos: devices: - name: SPINE1 configuration: ntp: authenticate: true logging: true servers: - ip: 10.50.100.1 prefer: true vrf: management key: 1 - ip: 10.50.100.2 vrf: management key: 1Example 3: NTP with custom polling intervals and master fallback
nxos: devices: - name: BORDER-LEAF1 configuration: ntp: authenticate: true logging: true master: true master_stratum: 8 servers: - ip: 10.50.100.1 prefer: true vrf: management key: 1 min_poll: 6 max_poll: 10 - ip: 10.50.100.2 vrf: management key: 1