NTP Configuration

Configuration Syntax and Commands

The following sections describe the NTP configuration syntax and commands.

Specifying the NTP Server

To configure the NTP server, you must specify details such as the IPv4 address and the domain name of the NTP server.

Syntax

set system ntp server <server-id>

Attribute Description

server <server-id>

Specifies the name of the NTP server.

ipv4-address <ipv4-address>

Specifies the IPv4 address of the NTP server.

domain-name <domain-name>

Specifies the domain name of the NTP server.

Example:

{
  "ietf-restconf:data": {
    "rtbrick-config:system": {
      "ntp": {
        "server": [
          {
            "server-name": "Server1",
            "ipv4-address": "198.51.100.100"
          }
        ]
      }
    },
  }
}

NTP Service Configuration

You can enable the NTP service under a specific VRF where NTP server is reachable (usually, the inband management VRF).

Syntax:

set inband-management instance <name> ntp

Attribute Description

<name> <instance-name>

Name of the instance

true/false

Enable or disable Network Time Protocol.

Example: NTP Configuration

{
    "rtbrick-config:inband-management": {
      "instance": [
        {
          "name": "mgmt-vrf",
          "ntp": "true"
        }
      ]
    }
  }

Setting the System Date & Time Using DHCP Option 42 NTP Servers Information

The RtBrick ONL installer image performs a boot time ntpdate operation to set the system date and time.

By default, it uses the pool.ntp.org but DHCP bindings received over the ma1 interface will override it if DHCP option 42 contains a list of one or more NTP servers.

Separately from this boot time setting, the system will continue to use NTPd to maintain accurate system date and time using the list of NTP servers contained in the RBFS configuration.

The /etc/ntp.boot-time-servers.conf file can be used to verify as its contents will be updated with the NTP servers from DHCP. Also, logs are available in /var/log/rtbrick-boot-time-ntpdate.log.