Download PDF
Home

1. Time Synchronization with NTP

The Network Time Protocol (NTP) enables you to synchronize time among network devices such as routers or switches in a network. It works by using an NTP server that maintains a highly accurate time, and allows clients to query for that time.

1.1. Prerequisites

  • An NTP server must be installed and configured in your network.

  • You must know the address of the NTP server.

1.2. Enabling NTP Service

To enable the NTP service, you need to perform the following tasks.

  • Enable the NTP service

  • Specify the NTP server

1.2.1. Enabling the NTP service

To enable the NTP service under a specific VRF where NTP server is reachable (usually the inband management VRF), enter the following command:

set inband-management instance <inband-mgmt-vrf> ntp true

Command Parameters

<inband-mgmt-vrf>

Specify the name of the VRF from which NT is reachable

Example
root@rtbrick: cfg> set inband-management instance mgmt-vrf ntp true
root@rtbrick: cfg> commit
admin@rtbrick:~$ rtb confd show datastore table dump global.instance.inband.mgmt.config
object: 1, sequence: 2, last update: Tue Sep 22 14:54:49 GMT +0000 2020
  attribute: instance_name (1), type: string (9), length: 9, value: mgmt-vrf
admin@rtbrick:~$

1.2.2. Specifying the NTP Server

To specify the NTP server, perform the following tasks:

1.2.2.1. Specify the IPv4 Server Address

To specify the IPv4 server address, enter the following command:

set system ntp server <server-id> ipv4-address <ipv4-address>

Command Parameters

<server-id>

Specifies the name of the NTP server.

<ipv4-address>

Specifies the IPv4 address of the NTP server.

Example
root@rtbrick: cfg> set system ntp server Server1 ipv4-address 1.1.1.1
root@rtbrick: cfg> commit
admin@rtbrick:~$ rtb confd show datastore table dump global.ntp.config
object: 1, sequence: 1, last update: Tue Sep 22 14:47:07 GMT +0000 2020
  attribute: ntp_server_id (1), type: string (9), length: 8, value: Server1
  attribute: ntp_server_ipv4 (2), type: ipv4addr (12), length: 4, value: 1.1.1.1
admin@rtbrick:~$
1.2.2.2. Specify the Domain Name of the NTP Server

To specify the domain name of the NTP server, enter the following command:

set system ntp server <server-id> domain-name <domain-name>

Command Parameters

<server-id>

Specifies the name of the NTP server.

<domain-name>

Specifies the domain name of the NTP server.

Example
root@rtbrick: cfg> set system ntp server Server2 domain-name 0.ubuntu.pool.ntp.org
root@rtbrick: cfg> set system ntp server Server1 ipv4-address 1.1.1.1
root@rtbrick: cfg> commit
root@rtbrick: cfg> exit

admin@rtbrick:~/development/libigmp$ rtb confd show datastore table dump global.ntp.config
object: 1, sequence: 2600001, last update: Mon Oct 19 07:17:38 GMT +0000 2020
  attribute: ntp_server_id (1), type: string (9), length: 8, value: Server1
  attribute: ntp_server_ipv4 (2), type: ipv4addr (12), length: 4, value: 1.1.1.1
object: 2, sequence: 2600002, last update: Mon Oct 19 07:17:38 GMT +0000 2020
  attribute: ntp_server_id (1), type: string (9), length: 8, value: Server2
  attribute: ntp_server_dns (3), type: string (9), length: 22, value: 0.ubuntu.pool.ntp.org
admin@rtbrick:~/development/libigmp$

©Copyright 2020 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrickā€™s Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.