Configuring NTP

NTP is a client/server application. Devices participating in NTP are either NTP servers, which provide time to other devices, or NTP clients, which request time from NTP servers. Servers are also clients and can be peered with each other as well. Configuring an IOS or NX-OS device as an NTP client is the simpler of the two models, so we’ll start there.

NTP Client

To configure an IOS or NX-OS device to request accurate time from an NTP server, use the ntp server command. You can list as many NTP servers as you need, each on a separate line. Here, I’ve listed seven publicly available NTP servers. Using so many will help illustrate how NTP behaves.

Note

On Nexus switches with multiple VDCs, only the default VDC may have NTP configured.

ntp server 132.163.4.102
ntp server 193.67.79.202
ntp server 152.1.58.124
ntp server 128.118.46.3
ntp server 129.6.15.29
ntp server 64.236.96.53
ntp server 208.184.49.9

Once you’ve configured the NTP servers, you should begin receiving accurate time signals (assuming you can reach them).

To see the status of the NTP servers in IOS, use the command show ntp associations. In this chapter, I’ll use the IP-PBX system I built in Chapter 30. This is a 2811 router running IOS version 15.0(1)M4:

R1-PBX#sho ntp associations address ref clock st when poll reach delay offset disp ~127.127.1.1 .LOCL. 7 7 16 37 0.000 0.000 437.71 ~128.118.46.3 .INIT. 16 - 64 0 0.000 0.000 15937. ~208.184.49.9 .INIT. 16 - 64 0 0.000 0.000 15937. +~129.6.15.29 .ACTS. ...

Get Network Warrior, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.