NTP Timing Based on GPS Clock

This chapter contains the following sections:

Configure NTP using GPS Time

You can set up Network Time Protocol (NTP) to use GPS time as the reference clock using the ntp refclock gps command.

The cellular modem-based GPS works only with cellular and not with the GPS on Dead Reckoning module.

Before you begin

  • Enable the cellular modem-based GPS and verify that it is working. To know more about cellular modem-based GPS, see Configuring GPS in the Cellular Pluggable Interface Module Configuration Guide.

  • Verify that you have a location fix for this feature to work using the show cellular cellular slot gps command.

  • Enable National Marine Electronics Association (NMEA) streaming. For more details on enabling NMEA, see the Enable NMEA Data Streaming section in the Cellular Pluggable Interface Module Configuration Guide.

  • Set up GPS time as a stratum 0 source and configure the Cisco IOS NTP server as a stratum 1 device to provide accurate time to NTP clients.

Procedure


Step 1

Use the configure terminal command to enter global configuration mode.

Example:

Router# configure terminal

Step 2

Use the controller cellular command to configure cellular location.

Example:

Router(config)# controller cellular 0/1/0

Step 3

Use the lte gps nmea command to enable National Marine Electronics Association (NMEA) streaming.

Example:

Router(config-controller)# lte gps nmea

Step 4

Use the end command to exit NMEA configuration mode and return to privileged EXEC mode.

Example:

Router(config-controller-nmea)# end

Step 5

Use the configure terminal command to enter global configuration mode.

Example:

Router# configure terminal

Step 6

Use the ntp refclock gps interface Cellular 0/1/0 command to configure the NTP reference clock as GPS.

Example:

Router(config)# ntp refclock gps interface Cellular 0/1/0

Step 7

Use the exit command to exit from the configuration prompt.

Example:

Router(config)# exit

Step 8

(Optional) Use the show cellular cellular slot gps command to view the GPS information.

Example:

Router# show cellular 0/1/0 gps
GPS Feature = enabled
GPS Mode Configured = standalone
Current Constellation Configured = gps
GPS Port Selected = Dedicated GPS port
GPS Status = GPS coordinates acquired
Last Location Fix Error = Offline [0x0]
Latitude = 50 Deg 36 Min 44.9907 Sec North
Longitude = 5 Deg 35 Min 12.0240 Sec East
Timestamp (GMT) = Tue Dec 17 17:06:05 2024

Fix type = 2D, Height = 64m
Satellite Info
----------------
Satellite #4, elevation 8, azimuth 329, SNR 31 *
Satellite #5, elevation 9, azimuth 88, SNR 37 *
Satellite #18, elevation 29, azimuth 170, SNR 48 *
Satellite #20, elevation 14, azimuth 54, SNR 30 *
Satellite #25, elevation 43, azimuth 111, SNR 40 *
Satellite #26, elevation 38, azimuth 292, SNR 34 *
Satellite #28, elevation 55, azimuth 227, SNR 44 *
Satellite #29, elevation 76, azimuth 67, SNR 38 *
Satellite #31, elevation 51, azimuth 281, SNR 29 *
Satellite #49, elevation 31, azimuth 180, SNR 46  **
Satellite #9, elevation 0, azimuth 0, SNR 0
Satellite #12, elevation 5, azimuth 106, SNR 0 *
Satellite #16, elevation 6, azimuth 288, SNR 0

Step 9

(Optional) Use the show ntp associations command to view the network time protocol associations.

Example:

Router# show ntp associations
  address         ref clock       st   when   poll reach  delay  offset   disp
x~127.127.5.1     .GPS.            0     58     64     3  0.000  -0.031 3938.4
*~45.87.78.35     244.220.219.218  2     51     64     3 13.985 495.081 64.377
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured

Step 10

(Optional) Use the show clock command to display the current time and clock details.

Example:


Router# show clock
17:12:56.870 UTC Tue Dec 17 2024

Step 11

(Optional) Use the debug ntp refclock command to troubleshoot the configuration.

Example:

Router# debug ntp refclock
*Sep 24 19:58:43.045 GMT: GPS: Poll Requested
*Sep 24 19:58:43.045 GMT: GPS (19:58:43.056 GMT Thu Sep 24 2020)
*Sep 24 19:58:43.045 GMT: Valid time rcvd from GPS: 2020/09/24 19:58:43.056 (frac = 0x0E560440)
*Sep 24 19:58:43.045 GMT: RTS poll timestamp (local clock) was 0xE31778F3.0B851ED8
*Sep 24 19:58:43.045 GMT: GPS timestamp is 0xE31778F3.0E560440
*Sep 24 19:58:43.045 GMT: NTP Core(NOTICE): ntpd PPM
*Sep 24 19:58:43.046 GMT: NTP Core(NOTICE): trans state : 5
*Sep 24 19:58:43.046 GMT: NTP Core(NOTICE): Clock is synchronized.