Skip to content
Ask AI

NTP Configuration

NTP(Network Time Protocol),is a protocol used to synchronize the time of individual computers in a network.

[Command]

show ntp

[Purpose]

Show NTP information

[View]

System view

[Use Cases]

sonic# show ntp
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.250.0.240 203.107.6.88 3 u 46 64 377 0.165 10.575 3.198

[Command]

ntp server ip-address [prefer]

no ntp server ip-address

[Purpose]

Configure NTP server

[Parameter]

ParameterDescription
ip-addressNTP server ip address

[View]

System configuration view

[Use Cases]

sonic(config)# ntp server 10.250.0.242

ntp source-interface interface-name [vrf {default|mgmt}]

Section titled “ntp source-interface interface-name [vrf {default|mgmt}]”

[Command]

ntp source-interface interface-name [vrf {default|mgmt}]

no ntp source-interface interface

[Purpose]

Specify the NTP source interface

[View]

System configuration view

[Notes]

Configuring the local source interface for sending/receiving NTP packets can help avoid using IP addresses from other interfaces on this device as the destination address for response packets.

[Use Cases]

sonic(config)# ntp source-interface Ethernet1 vrf default