Skip to content
Ask AI

NTP Configuration

[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

[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

[Command]

ntp source-interface {ethernet interface_num |vlan vlan_id |loopback loopback_id |mgmt} [vrf {default|mgmt}]

no ntp source-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 Loopback0 vrf default