Network Time Protocol Commands
Use these commands to configure Network Time Protocol (NTP) to synchronize the system time.
Network Time Protocol (NTP) is used for synchronization of the system time. The switch supports the client-side configurations of NTP.
ntp authenticate
M4250
M4350
This command enables NTP authentication.
| Default | Disabled |
| Format | ntp authenticate |
| Mode | Global Config |
Command example:
(NETGEAR Switch)(Config)#ntp authenticate
no ntp authenticate
This command disables NTP authentication.
| Format | no ntp authenticate |
| Mode | Global Config |
ntp authentication-key
M4250
M4350
This command configures the authentication key and the SHA-2 algorithm for a trusted NTP time source, and requires you to set a new password for NTP authentication. The NTP authentication key number must be unique across the switch.
| Default | SHA2 |
| Format | ntp authentication-key key-number sha2 [encrypted key-name] |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| key-number | The number for identifying an authentication key. The range is from 1 to 4,294,967,295. |
| key-name | The encrypted key-value. This is an optional setting. |
Command example:
(NETGEAR Switch)(Config)#ntp authentication-key 81 sha2
Enter new password:********
Confirm new password:********
no ntp authentication-key
This command deletes a configured authentication key.
| Format | no ntp authentication-key key-number |
| Mode | Global Config |
ntp trusted-key
M4250
M4350
This command designates one or more authentication keys from the configured list as the trusted key for client-server communication.
| Default | None |
| Format | ntp trusted-key {key-number | key-number-list} |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| key-number | The number for identifying an authentication key. The range is from 1 to 4,294,967,295. |
| key-number-list | The comma-separated list of authentication keys. For each key, the range is from 1 to 4,294,967,295. |
Command example:
(NETGEAR Switch)(Config)#ntp trusted-key 81
Command example:
(NETGEAR Switch)(Config)#ntp trusted-key 1,5,7
no ntp trusted-key
This command deletes one or more configured trusted keys.
| Format | no ntp trusted-key {key-number | key-number-list} |
| Mode | Global Config |
ntp broadcast client
M4250
M4350
This command configures the NTP client to run as a broadcast client, allowing the client to receive broadcast packets.
| Default | Disabled |
| Format | ntp broadcast client |
| Mode | Global Config |
Command example:
(NETGEAR Switch)(Config)#ntp broadcast client
no ntp broadcast client
This command disables the broadcast client mode.
| Format | no ntp broadcast client |
| Mode | Global Config |
ntp broadcastdelay
M4250
M4350
This command sets the estimated round-trip delay in microseconds between an NTP client and an NTP broadcast server. The delay is applicable only when the client is configured in broadcast mode. The delay can be from 1 to 999,999 microseconds.
| Default | 3000 |
| Format | ntp broadcastdelay microseconds |
| Mode | Global Config |
Command example:
(NETGEAR Switch)(Config)#ntp broadcastdelay 10000
no ntp broadcastdelay
This command resets the estimated round-trip delay in microseconds between an NTP client and an NTP broadcast server to the default.
| Format | no ntp broadcastdelay |
| Mode | Global Config |
ntp server
M4250
M4350
This command configures the NTP server to allow the system clock to be synchronized by a time server. You can configure multiple NTP servers. The server selection algorithm settles on the server for time synchronization.
Configuring a preferred status overrides the algorithm and the configured server is used for time synchronization. Configuring a preferred server reduces switching back and forth among servers. The preferred status indicates if an NTP server is the preferred server if two servers show different times, which is meaningful only if you configure two NTP servers. If you configure three or more NTP servers, the NTP function automatically finds the most reliable server.
| Default |
No NTP server configured The NTP version is 4. The minimum polling interval is 64 seconds. The maximum polling interval is 1024 seconds. |
| Format | ntp server server-address [version number] [key key-id] [minpoll interval] [maxpoll interval] [prefer] [burst] [iburst] |
| Mode | Global Config |
| Parameter | Description |
|---|---|
| server-address | The server IPv4 address, IPv6 address, or host name for the client to synchronize time with. The host name range is from 1 to 256 characters. |
| version number | The protocol version. The default is 4. The range is 1 to 4. |
| key key-id | The Authentication key, which can be from 1 to 4,294,967,295. |
| minpoll interval | The minimum polling interval in seconds as a power of 2. The range is from 4 to 17, which in seconds is 16 seconds to 131,072 seconds. The default is 64 seconds. |
| maxpoll interval | The maximum polling interval in seconds as a power of 2. The range is from 4 to 17, which in seconds is 16 seconds to 131,072 seconds. The default is 1024 seconds. |
| prefer | The server is a preferred server in the server selection. This is an optional setting. |
| burst | Within each synchronization interval, a series of packets instead of a single packet is sent. This method achieves faster synchronization. This is an optional setting. |
| iburst | During the initial synchronization interval, a series of packets instead of a single packet is sent. This method achieves faster initial synchronization. This is an optional setting. |
Command example:
(NETGEAR Switch)(Config)#ntp server 1.1.1.1
no ntp server
This command deletes a configured NTP server.
| Format | no ntp server server-address |
| Mode | Global Config |
ntp source-interface
M4250
M4350
This command configures the NTP source interface.
To specify an actual interface or port, do the following:
- For an M4250 series switch, use the argument slot/port.
- For an M4350 series switch, use the argument unit/slot/port, as shown in the command format.
| Default | None |
| Format | ntp source-interface [unit/slot/port | loopback interface-id | serviceport | vlan vlan-id} |
| Mode | Global Config |
Command example:
(NETGEAR Switch)(Config)#ntp source-interface vlan 45
no ntp source-interface
This command deletes the NTP source-interface configuration.
| Format | no ntp source-interface |
| Mode | Global Config |
show ntp
M4250
M4350
This command displays the global NTP configuration settings.
| Format | show ntp |
| Mode | Privileged EXEC |
| Fields | Description |
|---|---|
| NTP Broadcast Client Mode | The NTP broadcast client mode (Disabled or Enabled). |
| NTP Authentication Mode | The NTP authentication mode (Disabled or Enabled). |
| Broadcast Delay | The delay in microseconds, that is, the delay in receiving broadcast packets from the server. |
| Source Interface | The source interface that is used in NTP client communication with the server. |
| Source IPv4 Address | The source IPv4 address (if configured). |
| Source IPv6 Address | The source IPv6 address (if configured). |
| VRF Name | The VRF instance that the client is associated with. |
Command example:
(NETGEAR Switch) #show ntp
NTP Broadcast Client Mode ..................... Disabled
NTP Authentication Mode ....................... Enabled
Broadcast Delay ............................... 3000
Source Interface............................... 1/0/5
Source IPv4 Address............................ 1.2.3.4
Source IPv6 Address............................ ::
VRF Name....................................... test
show ntp authentication-keys
M4250
M4350
This command displays information about the configured NTP authentication keys.
| Format | show ntp authentication-keys |
| Mode | Privileged EXEC |
| Fields | Description |
|---|---|
| Key Id | The specified authentication key. |
| Key Value | The configured key value (encrypted). |
| Message Authentication Algorithm | By default, the authentication algorithm is SHA2. |
| Trusted | Indicates if the keys are trusted (Yes or No). |
Command example:
(NETGEAR Switch) #show ntp authentication-keys
Key Id ........................................ 1
Key Value ..................................... 66f7e003db45a5f4688fd3a7ee7112df
Message Authentication Algorithm .............. sha2
Trusted ....................................... Yes
Key Id ........................................ 2
Key Value ..................................... 66f7e003db45a5f4688fd3a7ee7112df
Message Authentication Algorithm .............. sha2
Trusted ....................................... No
show ntp servers
M4250
M4350
This command displays information about the configured NTP servers.
| Format | show ntp servers |
| Mode | Privileged EXEC |
| Fields | Description |
|---|---|
| Address | The IP address of the NTP server. |
| Version | The protocol version that the server is running. |
| Key Id | The authentication ID. |
| Minimum Poll Interval | The minimum polling interval in seconds as a power of 2. |
| Maximum Poll Interval | The maximum polling interval in seconds as a power of 2. |
| Prefer | The preference status for this server in the selection algorithm. |
| Burst | Indicates if a series of packets are sent instead of a single packet. |
| Iburst | Indicates if a series of packets are sent instead of a single packet during initial synchronization. |
Command example:
(NETGEAR Switch)#show ntp servers
Address ....................................... time-a.netgear.com
Version ....................................... 4
Key Id ........................................ 0
Minimum Poll Interval ......................... 6
Maximum Poll Interval ......................... 10
Prefer ........................................ No
Burst ......................................... Yes
Iburst ........................................ Yes
Address ....................................... time-c.netgear.com
Version ....................................... 4
Key Id ........................................ 0
Minimum Poll Interval ......................... 6
Maximum Poll Interval ......................... 10
Prefer ........................................ No
Burst ......................................... Yes
Iburst ........................................ Yes
show ntp status
M4250
M4350
This command displays the NTP synchronization status.
| Format | show ntp servers |
| Mode | Privileged EXEC |
The following table displays the most significant fields in the command output.
| Fields | Description |
|---|---|
| associd | The association identifier. |
| status | The status string with the client protocol status. |
| leap indicator | A 2-bit integer warning of an impending leap second to be inserted or deleted in the last minute of the current month. |
| stratum | An 8-bit integer indicating the stratum level of the local clock. |
| log2 precision | The precision of the local clock, in seconds to the nearest power of two. |
| root delay | The round trip delay to the reference clock. |
| root dispersion | The dispersion to the reference clock. |
| reference ID | The code identifying the particular server or reference clock. |
Command example:
(NETGEAR Switch)#show ntp status
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
system peer: ec2-52-20-169-152.compute-1.amazonaws.com:123
system peer mode: client
leap indicator: 00
stratum: 6
log2 precision: -22
root delay: 123.264
root dispersion: 47.976
reference ID: 0x3414a998
reference time: ead8f175.758c4e24 Fri, Nov 8 2024 20:22:13.459
system jitter: 2.734566
clock jitter: 0.868
clock wander: 0.036
broadcast delay: -50.000
symm. auth. delay: 0
show ntp packets
M4250
M4350
Use this command to display the global statistics for the NTP packets.
| Format | show ntp packets |
| Mode | Privileged EXEC |
| Fields | Description |
|---|---|
| Ntp In packets | The number of packets received by the client. |
| Ntp Out packets | The number of packets transmitted by the client. |
| Ntp old version packets | The number of packets that do not match the running version of the protocol. |
| Ntp protocol error packets | The number of packets received that fail protocol validation checks. |
Command example:
(NETGEAR Switch)#show ntp packets
Ntp In packets ................................ 6609
Ntp Out packets ............................... 6604
Ntp old version packets ....................... 0
Ntp protocol error packets .................... 0
show ntp associations
M4250
M4350
This command displays the NTP associations, and optionally per-association details or per-association statistics.
| Format | show ntp associations [detail | statistics] |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch)#show ntp associations
remote refid st t when poll reach delay offset jitter
==============================================================================
+54.111.222.33 54.90.191.9 5 u 884 1024 377 122.570 +0.384 0.571
*52.222.111.35 54.81.127.33 5 u 143 1024 377 122.093 -1.046 0.692
Command example:
(NETGEAR Switch)#show ntp associations detail
associd=54556 status=941d conf, reach, sel_candidate, 1 event, popcorn,
srcadr=ec2-54-156-236-53.compute-1.amazonaws.com, srcport=123,
dstadr=172.22.10.183, dstport=123, received=3307, sent=3360, badauth=0,
seldisp=0, selbroken=0, leap=00, stratum=5, precision=-21,
rootdelay=1.022, rootdisp=13.718, refid=0x365abf09,
reftime=ead8fc96.59076f7f Fri, Nov 8 2024 21:09:42.347,
rec=ead8ff47.74d14dff Fri, Nov 8 2024 21:21:11.456, reach=377,
unreach=0, hmode=3, pmode=4, hpoll=10, ppoll=10, headway=0, flash=00 ok,
keyid=0, offset=+0.384, delay=122.570, dispersion=0.064, jitter=0.571,
xleave=0.043,
filtdelay= 122.70 123.84 125.06 122.57 127.97 126.27 138.52 130.95,
filtoffset= +0.30 +0.20 +1.49 +0.38 -0.53 +0.01 +0.60 +0.27,
filtdisp= 0.00 0.03 0.06 0.09 0.12 0.15 0.18 0.21
associd=54557 status=96fa conf, reach, sel_sys.peer, 15 events, sys_peer,
srcadr=ec2-52-20-169-152.compute-1.amazonaws.com, srcport=123,
dstadr=172.22.10.183, dstport=123, received=3305, sent=3373, badauth=0,
seldisp=0, selbroken=0, leap=00, stratum=5, precision=-25,
rootdelay=0.626, rootdisp=0.183, refid=0x36517f21,
reftime=ead9021b.cd6620d7 Fri, Nov 8 2024 21:33:15.802,
rec=ead9022c.74b4c37f Fri, Nov 8 2024 21:33:32.455, reach=377,
unreach=0, hmode=3, pmode=4, hpoll=10, ppoll=10, headway=299,
Command example:
(NETGEAR Switch)#show ntp associations statistics
Association ................................... 54556
Ntp In packets ................................ 3307
Ntp Out packets ............................... 3360
Ntp protocol error packets .................... 0
Association ................................... 54557
Ntp In packets ................................ 3305
Ntp Out packets ............................... 3373
Ntp protocol error packets .................... 0
show ntp information
M4250
M4350
This command displays the NTP software information. The output fields are self-explanatory.
| Format | show ntp information |
| Mode | Privileged EXEC |
Command example:
(NETGEAR Switch)#show ntp information
Ntp Software Name ............................. ntpd
Ntp Software Version .......................... ntpd 4.2.8p17@1.4004-o
Ntp System Type ............................... Linux/4.14.174-ldk_6.x-4d296fa3