To configure routers and switches so they synchronize their clocks from a time source (NTP server), you would use the following command:
ntp server ip_address version number
This command specifies the NTP server's IP address and, optionally, the version of NTP you would like to use for synchronization.
Make sure to replace ip_address
with the actual IP address of your NTP server and version number
with the desired NTP version (optional, defaults to version 3 if not specified).